Skip to content

Commit

Permalink
feature(marketplace) back
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaSkywalker committed Mar 2, 2016
1 parent ef30b28 commit 6198770
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
26 changes: 26 additions & 0 deletions gulp/marketplace.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
'use strict';

var path = require('path');
var gulp = require('gulp');
var zip = require('gulp-zip');
var prompt = require('gulp-prompt');
var rename = require('gulp-rename');

gulp.task('marketplace-release', ['build'], 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/**', 'gulp/**', 'bower.json', 'gulpfile.js', 'package.json', 'README.md', '.gitignore'], {base: "."})
.pipe(rename(function (path) {
path.dirname = nameAndVersion + '/' + path.dirname;
}))
.pipe(zip(nameAndVersion + '.zip'))
.pipe(gulp.dest('.'));
}));

});
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
"http-proxy-middleware": "~0.9.0",
"chalk": "~1.1.1",
"uglify-save-license": "~0.4.1",
"wrench": "~1.5.8"
"wrench": "~1.5.8",
"gulp-prompt": "^0.1.2",
"gulp-rename": "^1.2.2",
"gulp-zip": "^3.0.2"
},
"scripts": {
"postinstall": "bower install"
Expand Down

0 comments on commit 6198770

Please sign in to comment.