Skip to content

Instantly share code, notes, and snippets.

@dotnetCarpenter
Created May 27, 2013 18:11
Show Gist options
  • Save dotnetCarpenter/5658361 to your computer and use it in GitHub Desktop.
Save dotnetCarpenter/5658361 to your computer and use it in GitHub Desktop.
module.exports = function(grunt) {
// grunt.registerTask('custom', 'Add a custom task to grunt', function() {
// ;
// }
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
cssmin: {
compress: {
files: {
'<%= pkg.baseDir %>style.min.css': ['<%= pkg.baseDir %>css/shame.css', '<%= pkg.baseDir %>style.css', '<%= pkg.baseDir %>css/peer.css']
}
}
},
concat: {
options: {
stripBanners: true
},
dist: {
src: ['<%= pkg.baseDir %>css/shame.css', '<%= pkg.baseDir %>style.css', '<%= pkg.baseDir %>css/peer.css']
, dest: '<%= pkg.baseDir %>style.pack.css'
}
}
});
// Load plugins
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-cssmin');
// Default task(s).
grunt.registerTask('default', ['cssmin']);
// concat
grunt.registerTask('concat', ['concat']);
}
{
"name": "pragmatic",
"private": true,
"version": "0.1.2",
"author": "dotnetCarpenter <jon@it-kollektivet.dk>",
"description": "build system for the pragmatic project",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-cssmin": "~0.6.0"
},
"baseDir": "wordpress/wp-content/themes/pragmatic/"
}
-
|- Gruntfile.js
|- node_modules
|- package.json
|- wordpress
|-wp-content
|- themes
|- pragmatic
|- css
|- peer.css
|- shame.css
|- style.css
|- style.min.css
@dotnetCarpenter
Copy link
Author

Back reference to issue #29 gruntjs/grunt-contrib-concat#29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment