mirror of
https://github.com/chinchang/web-maker.git
synced 2025-04-16 08:44:45 +02:00
Add a gulp server to serve preview domain on 7888
This commit is contained in:
parent
1d88db8e10
commit
df9ca995d4
@ -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',
|
||||
|
@ -3,10 +3,10 @@
|
||||
"version": "3.6.1",
|
||||
"description": "A blazing fast & offline web playground",
|
||||
"scripts": {
|
||||
"start": "if-env NODE_ENV=production && npm run -s serve || npm run -s dev",
|
||||
"start": "npm run -s dev && gulp start-preview-server",
|
||||
"build": "preact build --template src/index.html --no-prerender --service-worker false",
|
||||
"serve": "preact build && preact serve",
|
||||
"dev": "preact watch --template src/index.html --https --no-prerender",
|
||||
"dev": "preact watch --template src/index.html --no-prerender",
|
||||
"lint": "eslint src",
|
||||
"test": "jest",
|
||||
"precommit": "lint-staged",
|
||||
@ -65,6 +65,7 @@
|
||||
"copy-webpack-plugin": "^4.5.1",
|
||||
"esprima": "^4.0.0",
|
||||
"firebase": "^5.5.8",
|
||||
"gulp-connect": "^5.7.0",
|
||||
"jszip": "^3.1.5",
|
||||
"preact": "^8.2.6",
|
||||
"preact-compat": "^3.17.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user