mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(gulp) package add from npm
This commit is contained in:
parent
a5bc09753b
commit
30d275ef18
2 changed files with 12 additions and 20 deletions
|
|
@ -1,29 +1,20 @@
|
|||
(function() {
|
||||
'use strict';
|
||||
|
||||
var DIR = '../../',
|
||||
fs = require('fs'),
|
||||
|
||||
cl = require('../cl'),
|
||||
Info = require(DIR + 'package');
|
||||
var version = require('version-io'),
|
||||
cl = require('../cl');
|
||||
|
||||
module.exports = function() {
|
||||
var data,
|
||||
version = Info.version,
|
||||
versionNew = cl.getVersion();
|
||||
var versionNew = cl.getVersion();
|
||||
|
||||
if (!versionNew) {
|
||||
if (!versionNew)
|
||||
cl.showVersionError();
|
||||
} else {
|
||||
Info.version = versionNew;
|
||||
data = JSON.stringify(Info, 0, 2) + '\n';
|
||||
Info.version = version;
|
||||
|
||||
fs.writeFile('package.json', data, function(error) {
|
||||
var msg = 'package: done';
|
||||
|
||||
console.log(error || msg);
|
||||
else
|
||||
version(versionNew, function(error) {
|
||||
if (error)
|
||||
console.error(error.message);
|
||||
else
|
||||
console.log('package: done');
|
||||
});
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@
|
|||
"gulp-mocha": "~1.1.0",
|
||||
"gulp-recess": "~1.0.0",
|
||||
"morgan": "~1.4.0",
|
||||
"should": "~4.0.x"
|
||||
"should": "~4.0.x",
|
||||
"version-io": "~1.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6.x"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue