Skip to content

Instantly share code, notes, and snippets.

@johnbintz
Last active August 29, 2015 13:57
Show Gist options
  • Save johnbintz/9498860 to your computer and use it in GitHub Desktop.
Save johnbintz/9498860 to your computer and use it in GitHub Desktop.
Run lein cljsbuild auto with Grunt
module.exports = (grunt) ->
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks)
grunt.initConfig {
app:
dev: "app"
watch:
sass:
files: ['<%= app.dev %>/**/*.scss']
tasks: ['compass:dist']
compass:
dist:
options:
config: 'config/compass.rb'
express:
server:
options:
bases: require('path').resolve("./<%= app.dev %>")
concurrent:
default:
tasks: [ 'server', 'longrunning:cljs', 'watch' ]
options:
limit: 3
logConcurrentOutput: true
longrunning:
cljs:
commands: [
{ options: { cmd: "lein", args: [ "cljsbuild", "auto" ] } }
]
}
grunt.registerTask 'server', [ 'express:server', 'express-keepalive' ]
grunt.registerTask 'default', [ 'concurrent:default' ]
{
"name": "my-clojurescript-project",
"version": "0.0.0",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-watch": "~0.4.0",
"grunt-contrib-compass": "~0.5.0",
"grunt-express": "~1.2.1",
"grunt-concurrent": "~0.4.3",
"matchdep": "~0.1.2",
"grunt-longrunning": "0.0.0"
},
"engines": {
"node": ">=0.8.0"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment