Created
March 25, 2014 01:26
-
-
Save digilord/9753632 to your computer and use it in GitHub Desktop.
Grunt & Package file for MEAN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gruntFunction = (grunt) -> | |
gruntConfig = | |
develop: | |
server: | |
file: 'app.js' | |
shell: | |
killmongo: | |
command: 'killall mongod' | |
options: | |
async: false | |
mongo: | |
command: 'mongod' | |
options: | |
async: true | |
coffee: | |
compile: | |
files: | |
'public/javascripts/app.js': ['public/javascripts/*.coffee'] | |
'routes/index.js': ['routes/*.coffee'] | |
'app.js': 'app.coffee' | |
less: | |
compile: | |
options: | |
compress: true | |
# yuicompress: true | |
optimization: 2 | |
files: | |
'public/stylesheets/style.css': 'public/stylesheets/**/*.less' | |
lint: | |
files: ['public/javascripts/*.js'] | |
jshint: | |
options: | |
curly: true | |
eqeqeq: true | |
immed: true | |
latedef: true | |
newcap: true | |
noarg: true | |
sub: true | |
undef: true | |
boss: true | |
eqnull: true | |
browser: true | |
globals: | |
jQuery: true | |
watch: | |
config: | |
files: ['Gruntfile.coffee'] | |
options: | |
reload: true | |
coffee: | |
files: ['public/javascripts/*.coffee','app.coffee'] | |
tasks: ['coffee'] | |
javascripts: | |
files: ['public/javascripts/**/*.js'] | |
tasks: ['jshint', 'develop'] | |
options: | |
spawn: false | |
livereload: true | |
jade: | |
files: ['views/*.jade'] | |
options: | |
spawn: false | |
livereload: true | |
css: | |
files: ['public/stylesheets/*.less'] | |
tasks: ['less'] | |
options: | |
livereload: true | |
grunt.initConfig gruntConfig | |
grunt.loadNpmTasks 'grunt-contrib' | |
grunt.loadNpmTasks 'grunt-shell-spawn' | |
grunt.loadNpmTasks 'grunt-develop' | |
grunt.registerTask 'default', ['shell','less', 'coffee' ,'develop','watch'] | |
null | |
#debug : call with a dummy 'grunt', that spits params on console.log | |
#gruntFunction | |
# initConfig: (cfg)-> console.log 'grunt: initConfig\n', JSON.stringify cfg, null, ' ' | |
# loadNpmTasks: (tsk)-> console.log 'grunt: registerTask: ', tsk | |
# registerTask: (shortCut, task)-> console.log 'grunt: registerTask:', shortCut, task | |
module.exports = gruntFunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "myTemplate", | |
"version": "0.0.1", | |
"author": "DigiLord <[email protected]>", | |
"private": true, | |
"scripts": { | |
"start": "node app.js" | |
}, | |
"dependencies": { | |
"express": "3.4.8", | |
"jade": "*", | |
"mongodb": ">= 0.9.6-7", | |
"mongoose": ">= 3.6" | |
}, | |
"devDependencies": { | |
"grunt": "~0.4.0", | |
"grunt-contrib-copy": "^0.5.0", | |
"grunt-contrib-concat": "^0.3.0", | |
"grunt-contrib-clean": "^0.5.0", | |
"grunt-contrib-htmlmin": "^0.2.0", | |
"grunt-contrib-sass": "^0.7.3", | |
"grunt-contrib-requirejs": "^0.4.3", | |
"grunt-contrib-compass": "^0.7.2", | |
"grunt-contrib-jst": "^0.5.1", | |
"grunt-contrib-cssmin": "^0.7.0", | |
"grunt-contrib-coffee": "^0.10.1", | |
"grunt-contrib-uglify": "^0.3.3", | |
"grunt-contrib-watch": "^0.5.3", | |
"grunt-contrib-csslint": "^0.2.0", | |
"grunt-contrib-jasmine": "^0.6.1", | |
"grunt-contrib-qunit": "^0.4.0", | |
"grunt-contrib-nodeunit": "^0.3.3", | |
"grunt-contrib-compress": "^0.6.1", | |
"grunt-contrib-jshint": "^0.8.0", | |
"grunt-contrib-connect": "^0.6.0", | |
"grunt-contrib-handlebars": "^0.6.1", | |
"grunt-contrib-stylus": "^0.12.0", | |
"grunt-contrib-imagemin": "^0.4.1", | |
"grunt-contrib-less": "^0.9.0", | |
"grunt-contrib-jade": "^0.10.0", | |
"grunt-contrib-yuidoc": "^0.5.2", | |
"grunt-contrib": "^0.9.0", | |
"grunt-shell-spawn": "^0.3.0", | |
"grunt-express-server": "^0.4.13", | |
"grunt-develop": "^0.3.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment