fixed pack
This commit is contained in:
1 parent
34157cded4
commit
355f791c42
3 files changed
+13
-9
No files matched your search
@@ -103,7 +103,7 @@ program
|
||||
});
|
||||
|
||||
program
|
||||
.command('build')
|
||||
.command('pack')
|
||||
.alias('b')
|
||||
.description('打包构建一个已存在的项目')
|
||||
.option('-n, --name [pathName]', '打包构建路径名称')
|
||||
@@ -133,7 +133,7 @@ program
|
||||
inquirer.prompt(promps).then(function (answers) {
|
||||
//console.log('\n',answers)
|
||||
option = Object.assign(answers,option);
|
||||
//console.log(option);
|
||||
//console.log(option.name);
|
||||
task.pack(option.name);
|
||||
})
|
||||
});
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*TMODJS:{"version":3,"md5":"82a0633ce39bc9927db661a771415017"}*/
|
||||
template('test/hello',function($data,$filename
|
||||
/**/) {
|
||||
/*TMODJS:{"version":4,"md5":"f1c57d40af99b4e6b3fb34ac8537557c"}*/
|
||||
define(function(require){return require('../template')('test/hello', function($data,$filename
|
||||
/*``*/) {
|
||||
'use strict';var $utils=this,$helpers=$utils.$helpers,$escape=$utils.$escape,name=$data.name,$out='';$out+='<h1>hello,';
|
||||
$out+=$escape(name);
|
||||
$out+='</h1> <p>哈哈哈哈!</p>';
|
||||
return new String($out);
|
||||
});
|
||||
});});
|
||||
+7
-3
@@ -19,6 +19,7 @@ const runSequence = require('run-sequence');
|
||||
const plumber = require('gulp-plumber');
|
||||
const notify = require('gulp-notify');
|
||||
const copy = require('gulp-contrib-copy');
|
||||
const chalk = require('chalk');
|
||||
const util = require('./util');
|
||||
const watch = require('./watch');
|
||||
|
||||
@@ -172,11 +173,13 @@ init = (pathName) => {
|
||||
});
|
||||
|
||||
|
||||
gulp.task('build', function(callback) {
|
||||
runSequence('stylus_build', 'swig_build', 'htmlmin_build', 'tmod_build', 'babel_build', 'uglify_build');
|
||||
gulp.task('build', function() {
|
||||
runSequence('stylus_build', 'swig_build', 'htmlmin_build', 'tmod_build', 'babel_build', 'uglify_build',function() {
|
||||
console.log(chalk.green.bold(pathName + ' 打包完成!'));
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('dev', function(callback) {
|
||||
gulp.task('dev', function() {
|
||||
runSequence('stylus_build', 'swig_build', 'htmlmin_build', 'tmod_build', 'babel_build', 'server');
|
||||
});
|
||||
|
||||
@@ -223,5 +226,6 @@ exports.dev = (pathName) => {
|
||||
|
||||
exports.pack = (pathName) => {
|
||||
init(pathName);
|
||||
//console.log(chalk.green(pathName));
|
||||
runSequence('build');
|
||||
}
|
||||
Reference in new issue
Block a user