Skip to content

Instantly share code, notes, and snippets.

@ZeroDragon
Last active December 31, 2015 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZeroDragon/7952495 to your computer and use it in GitHub Desktop.
Save ZeroDragon/7952495 to your computer and use it in GitHub Desktop.
Setup de Grunt DEMO, para ver toda la explicación, está en http://www.zerothedragon.com/686/grunt-es-lo-que-necesitas/ :D
module.exports = (grunt)->
grunt.loadNpmTasks 'grunt-contrib-watch';
grunt.loadNpmTasks 'grunt-yui-compressor';
grunt.loadNpmTasks 'grunt-contrib-less';
grunt.loadNpmTasks 'grunt-contrib-clean';
grunt.registerTask('default', ['watch']);
grunt.initConfig {
watch: {
css: {
files: ['public/css/src/*.less',],
tasks: [ 'less', 'cssmin', 'clean' ],
},
options: {
forever:true,
livereload:true,
}
},
clean: {
css: {
src: [ 'public/css/src/*.css']
}
},
less: {
compile:{
files: {
'public/css/src/style.css': ['public/css/src/style.less']
}
}
},
cssmin: {
dist: {
files: [
{
'src': 'public/css/src/style.css',
'dest': 'public/css/style.min.css'
}
]
}
}
}
{
"name": "El-Nombre-de-Mi-Proyecto",
"version": "x.x.x",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-contrib-watch": "",
"grunt-yui-compressor": "",
"grunt-contrib-less": "",
"grunt-contrib-clean": ""
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment