diff --git a/Gruntfile.js b/Gruntfile.js index f43e52b..5366066 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -9,8 +9,16 @@ grunt.initConfig({ pkg : grunt.file.readJSON('package.json'), bower: grunt.file.readJSON('bower.json'), - // -- Clean Config --------------------------------------------------------- + // -- bower.json Config --------------------------------------------------------- + bower_json: { + release: { + main: 'pure.css' + } + }, + + // -- Clean Config --------------------------------------------------------- + clean: { build : ['build/'], build_res: ['build/*-r.css'], @@ -25,6 +33,10 @@ grunt.initConfig({ dest : 'build/', expand : true, flatten: true + }, + release: { + src : '{LICENSE.md,README.md,HISTORY.md}', + dest : 'build/' } }, @@ -135,12 +147,8 @@ grunt.initConfig({ expand : true, flatten: true, - dest : '<%= pkg.name %>/<%= pkg.version %>/', - - src: [ - '{bower.json,LICENSE.md,README.md,HISTORY.md}', - 'build/*.css' - ] + src : 'build/*', + dest : '<%= pkg.name %>/<%= pkg.version %>/' } }, @@ -249,6 +257,8 @@ grunt.registerTask('watch', ['default', 'observe']); grunt.registerTask('release', [ 'default', 'clean:release', + 'copy:release', + 'bower_json', 'compress:release' ]); diff --git a/bower.json b/bower.json index 54acc0b..5132ff4 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,7 @@ { "name": "pure", "version": "0.4.2-pre", + "main": "build/pure.css", "devDependencies": { "normalize-css": "1.1.3" } diff --git a/tasks/bower_json.js b/tasks/bower_json.js new file mode 100644 index 0000000..b341826 --- /dev/null +++ b/tasks/bower_json.js @@ -0,0 +1,8 @@ +'use strict'; + +module.exports = function (grunt) { + grunt.registerMultiTask('bower_json', 'Modifies bower.json "main".', function () { + grunt.config('bower.main', this.data.main); + grunt.file.write('build/bower.json', JSON.stringify(grunt.config('bower'),null,' ')); + }); +};