Skip to content

Instantly share code, notes, and snippets.

@ahhmarr
Last active August 29, 2015 14:04
Show Gist options
  • Save ahhmarr/4442c73976edcac49ef1 to your computer and use it in GitHub Desktop.
Save ahhmarr/4442c73976edcac49ef1 to your computer and use it in GitHub Desktop.
my grunt file
module.exports=function(grunt)
{
grunt.initConfig({
uglify:{
files :{
src : "js/*.js",
dest : "js/jsmin/",
flatten :true,
expand :true,
ext : ".min.js"
}
},
cssmin : {
files : {
src : "css/*.css",
dest : "css/cssmin/",
flatten:true,
expand:true,
ext : ".min.css"
}
},
sass : {
files : {
cwd : "css/sass/",
src : ["*.scss","*.sass"],
dest : "css/",
flatten : true,
expand : true,
ext : ".css"
}
},
watch : {
js : { files : "js/*.js",tasks :["uglify"]},
css : { files : "css/*.css",tasks :["cssmin"]},
sass : { files : "css/sass/*.scss",tasks :["sass"]}
}
});
grunt.loadNpmTasks("grunt-contrib-sass");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-cssmin");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.registerTask('default',["sass","uglify","cssmin","watch"]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment