Skip to content

Commit 6198770

Browse files
feature(marketplace) back
1 parent ef30b28 commit 6198770

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

gulp/marketplace.js

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
'use strict';
2+
3+
var path = require('path');
4+
var gulp = require('gulp');
5+
var zip = require('gulp-zip');
6+
var prompt = require('gulp-prompt');
7+
var rename = require('gulp-rename');
8+
9+
gulp.task('marketplace-release', ['build'], function () {
10+
return gulp.src('')
11+
.pipe(prompt.prompt({
12+
type: 'input',
13+
name: 'version',
14+
message: 'Please enter release version (x.x.x)'
15+
}, function (res) {
16+
var nameAndVersion = 'blur-admin-' + res.version;
17+
return gulp
18+
.src(['src/**', 'release/**', 'gulp/**', 'bower.json', 'gulpfile.js', 'package.json', 'README.md', '.gitignore'], {base: "."})
19+
.pipe(rename(function (path) {
20+
path.dirname = nameAndVersion + '/' + path.dirname;
21+
}))
22+
.pipe(zip(nameAndVersion + '.zip'))
23+
.pipe(gulp.dest('.'));
24+
}));
25+
26+
});

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
"http-proxy-middleware": "~0.9.0",
4444
"chalk": "~1.1.1",
4545
"uglify-save-license": "~0.4.1",
46-
"wrench": "~1.5.8"
46+
"wrench": "~1.5.8",
47+
"gulp-prompt": "^0.1.2",
48+
"gulp-rename": "^1.2.2",
49+
"gulp-zip": "^3.0.2"
4750
},
4851
"scripts": {
4952
"postinstall": "bower install"

0 commit comments

Comments
 (0)