Skip to content

Instantly share code, notes, and snippets.

@chrisbodhi
Created June 3, 2015 18:20
Show Gist options
  • Select an option

  • Save chrisbodhi/00e85209136577cf5382 to your computer and use it in GitHub Desktop.

Select an option

Save chrisbodhi/00e85209136577cf5382 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
express: {
dev: {
options: {
script: 'app.js'
}
}
},
jshint: {
files: [
'app.js',
'Gruntfile.js',
'middlewares/**/*.js',
'routes/**/*.js'
],
options: { globals: {
jQuery: true
}
}
},
open: {
all: {path: 'http://local.gamesalad.com:3000'}
},
sass: {
options: {
sourceMap: true
},
dist: {
files: {
'.public-dev/css/stylesheet.css': 'public/scss/stylesheet.scss',
'public-build/css/stylesheet.css': 'public/scss/stylesheet.scss'
}
}
},
watch: {
options: {
livereload: true
},
css: {
files: '.public-dev/css/stylesheet.css'
},
express: {
files: [
'**/*.js',
'!node_modules/**/*',
'!public/bower_components/**/*',
'!public-build/bower_components/**/*'
],
tasks: ['express:dev'],
options: {
spawn: false
}
},
jade: {
files: ['./views/**/*.jade']
},
sass: {
files: './public/scss/**/*.scss',
tasks: ['sass'],
options: {
livereload: false
}
},
scripts: {
files: ['<%= jshint.files %>'],
tasks: ['jshint'],
options: {
spawn: false
}
}
}
});
// Default task
grunt.registerTask('default', ['express', 'open', 'watch']);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment