Skip to content

Instantly share code, notes, and snippets.

@say2joe
Created October 5, 2012 18:22
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 say2joe/3841498 to your computer and use it in GitHub Desktop.
Save say2joe/3841498 to your computer and use it in GitHub Desktop.
Sample Grunt Task (JavaScript)
module.exports = function(grunt) {
grunt.initConfig({
min: {
plugins: {
src: ["vendor/jquery.isotope.min.js","vendor/plugins.js","vendor/modal.js","vendor/jqpp.js"],
dest: "dist/plugins.min.js",
separator: ';'
},
app: {
src: ["content-tiles.js","brand-panel.js","modal.js"],
dest: "dist/app.min.js",
separator: ';'
},
analytics: {
src: ["taglist.js","s_code.js"],
dest: "dist/analytics.min.js",
separator: ';'
}
},
mincss: {
compress: {
files: {
"../css/application.css": [
"../css/base.css",
"../css/content-tiles.css",
"../css/brand-panel.css",
"../css/modal.css"
]
}
}
},
compress: {
options: { mode: "gzip" },
zip: { files: { "application.js.gz": ["dist/*.js"] } }
}
});
grunt.loadNpmTasks('grunt-contrib-mincss');
//grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('default','min mincss');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment