mirror of
https://github.com/chinchang/web-maker.git
synced 2025-06-21 15:04:01 +02:00
Add a gulp server to serve preview domain on 7888
This commit is contained in:
@ -12,6 +12,7 @@ const child_process = require('child_process');
|
||||
const merge = require('merge-stream');
|
||||
const zip = require('gulp-zip');
|
||||
var packageJson = JSON.parse(fs.readFileSync('./package.json'));
|
||||
const connect = require('gulp-connect');
|
||||
|
||||
function minifyJs(fileName) {
|
||||
const content = fs.readFileSync(fileName, 'utf8');
|
||||
@ -199,6 +200,14 @@ gulp.task('cleanup', function() {
|
||||
return child_process.execSync('rm -rf build');
|
||||
});
|
||||
|
||||
gulp.task('start-preview-server', function() {
|
||||
connect.server({
|
||||
root: 'preview',
|
||||
port: 7888,
|
||||
https: false
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('release', function(callback) {
|
||||
runSequence(
|
||||
'runWebpack',
|
||||
|
Reference in New Issue
Block a user