mirror of https://github.com/akveo/blur-admin
feat(build): added marketplace release task
parent
c6761c721c
commit
16b2388d24
22
gulpfile.js
22
gulpfile.js
|
@ -11,6 +11,9 @@ var uglify = require('gulp-uglify');
|
|||
var eventStream = require('event-stream');
|
||||
var templateCache = require('gulp-angular-templatecache');
|
||||
var minifyHTML = require('gulp-minify-html');
|
||||
var zip = require('gulp-zip');
|
||||
var prompt = require('gulp-prompt');
|
||||
var rename = require('gulp-rename');
|
||||
|
||||
var bootstrapCssSrc = 'bower_components/bootstrap/dist/css/bootstrap.min.css';
|
||||
|
||||
|
@ -167,4 +170,23 @@ gulp.task('watch', function () {
|
|||
|
||||
gulp.task('init', ['minify-css', 'imagemin', 'js-lib', 'js', 'font', 'templateCache', 'html']);
|
||||
|
||||
gulp.task('marketplace-release', ['init'], function() {
|
||||
return gulp.src('')
|
||||
.pipe(prompt.prompt({
|
||||
type: 'input',
|
||||
name: 'version',
|
||||
message: 'Please enter release version (x.x.x)'
|
||||
}, function(res){
|
||||
var nameAndVersion = 'blur-admin-' + res.version;
|
||||
return gulp
|
||||
.src(['src/**', 'release/**', 'bower.json', 'package.json', 'README.md', '.gitignore'], { base : "." })
|
||||
.pipe(rename(function (path) {
|
||||
path.dirname = nameAndVersion + '/' + path.dirname;
|
||||
}))
|
||||
.pipe(zip(nameAndVersion + '.zip'))
|
||||
.pipe(gulp.dest('.'));
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
gulp.task('default', ['init']);
|
|
@ -2,6 +2,7 @@
|
|||
"name": "blur_admin",
|
||||
"version": "0.0.1",
|
||||
"devDependencies": {
|
||||
"bower": "^1.5.2",
|
||||
"event-stream": "^3.3.1",
|
||||
"gulp": "^3.9.0",
|
||||
"gulp-angular-templatecache": "^1.7.0",
|
||||
|
@ -11,10 +12,12 @@
|
|||
"gulp-imagemin": "^2.3.0",
|
||||
"gulp-minify-css": "^1.2.1",
|
||||
"gulp-minify-html": "^1.0.4",
|
||||
"gulp-prompt": "^0.1.2",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-sass": "^2.0.4",
|
||||
"gulp-strip-debug": "^1.0.2",
|
||||
"gulp-uglify": "^1.4.0",
|
||||
"bower": "^1.5.2"
|
||||
"gulp-zip": "^3.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "bower install"
|
||||
|
|
Loading…
Reference in New Issue