mirror of
https://github.com/pure-css/pure.git
synced 2024-11-07 21:34:24 +00:00
Add Grunt release
task to create a .zip archive of the build/ dir
This adds the new `release` Grunt task which creates a .zip file in the `release/[version]/` dir with the following name format and structure: `[name]-[version].zip` where `name` and `version` are from package.json. . └── kimono └── 0.0.1 └── *.css
This commit is contained in:
parent
f0d71204bf
commit
52c6ac538b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
.DS_Store
|
||||
build/
|
||||
node_modules/
|
||||
release/
|
||||
|
23
Gruntfile.js
23
Gruntfile.js
@ -23,6 +23,7 @@ grunt.initConfig({
|
||||
clean: {
|
||||
build : ['build/'],
|
||||
build_res: ['build/*-r.css'],
|
||||
release : ['release/<%= pkg.version %>/'],
|
||||
base : ['src/base/css/', 'src/base/tests/', 'src/base/LICENSE.md']
|
||||
},
|
||||
|
||||
@ -157,6 +158,21 @@ grunt.initConfig({
|
||||
}
|
||||
},
|
||||
|
||||
// -- Compress Config ------------------------------------------------------
|
||||
|
||||
compress: {
|
||||
release: {
|
||||
options: {
|
||||
archive: 'release/<%= pkg.version %>/<%= pkg.name %>-<%= pkg.version %>.zip'
|
||||
},
|
||||
|
||||
expand : true,
|
||||
flatten: true,
|
||||
src : 'build/*.css',
|
||||
dest : '<%= pkg.name %>/<%= pkg.version %>/'
|
||||
}
|
||||
},
|
||||
|
||||
// -- Contextualize Config -------------------------------------------------
|
||||
|
||||
contextualize: {
|
||||
@ -178,6 +194,7 @@ grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
grunt.loadNpmTasks('grunt-contrib-compress');
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'clean:build',
|
||||
@ -192,6 +209,12 @@ grunt.registerTask('import', [
|
||||
'import-normalize'
|
||||
]);
|
||||
|
||||
grunt.registerTask('release', [
|
||||
'default',
|
||||
'clean:release',
|
||||
'compress:release'
|
||||
]);
|
||||
|
||||
// -- Import Tasks -------------------------------------------------------------
|
||||
|
||||
grunt.registerTask('import-normalize', [
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "Kimono",
|
||||
"name": "kimono",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
@ -8,6 +8,7 @@
|
||||
"grunt-contrib-cssmin": "~0.6.0",
|
||||
"grunt-contrib-clean": "~0.4.1",
|
||||
"grunt-contrib-copy": "~0.4.1",
|
||||
"grunt-contrib-concat": "~0.3.0"
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-compress": "~0.5.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user