1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-06-15 00:30:40 +02:00

gulpfile: changes for new packages/website

This commit is contained in:
Kushagra Gour
2019-03-14 23:32:10 +05:30
parent d83a245f14
commit 962021a8bf
2 changed files with 10 additions and 12 deletions

View File

@ -194,18 +194,14 @@ gulp.task('packageExtension', function() {
);
});
gulp.task('buildWebsite', function() {
return child_process.execSync('yarn run build-website');
});
gulp.task('buildDistFolder', function() {
child_process.execSync('mkdir dist');
child_process.execSync('cp index.html dist/');
child_process.execSync('cp -R uninstall dist/');
child_process.execSync('cp -R privacy-policy dist/');
child_process.execSync('cp -R icons dist/');
child_process.execSync('cp -R docs dist/');
child_process.execSync('cp -R chrome-logo.png dist/');
child_process.execSync('rm -rf dist');
child_process.execSync('mv packages/website/_site dist');
child_process.execSync('mv app dist/');
child_process.execSync('cp ss1.png dist/');
child_process.execSync('cp icon-128.png dist/');
child_process.execSync('cp manifest.json dist/');
});
gulp.task('cleanup', function() {
@ -244,7 +240,7 @@ gulp.task('release', function(callback) {
gulp.task('dev-release', function(callback) {
runSequence(
'runWebpack',
['runWebpack', 'buildWebsite'],
'copyFiles',
'fixIndex',
'useRef',

View File

@ -7,6 +7,8 @@
"build": "preact build --template src/index.html --no-prerender --service-worker false",
"serve": "preact build && preact serve",
"dev": "preact watch --template src/index.html --no-prerender",
"serve-website": "cd packages/website; npm start",
"build-website": "cd packages/website; npm run build",
"lint": "eslint src",
"test": "jest",
"precommit": "lint-staged",
@ -25,7 +27,7 @@
"src/detached-window.js"
],
"lint-staged": {
"*.{js,jsx,json,css,md}": [
"*.{js,jsx,json,css,md,html}": [
"prettier --write",
"git add"
]