mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-28 17:20:13 +02:00
create single folder with website and app
This commit is contained in:
15
gulpfile.js
15
gulpfile.js
@@ -194,6 +194,20 @@ gulp.task('packageExtension', function() {
|
||||
);
|
||||
});
|
||||
|
||||
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('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() {
|
||||
return child_process.execSync('rm -rf build');
|
||||
});
|
||||
@@ -236,6 +250,7 @@ gulp.task('dev-release', function(callback) {
|
||||
'useRef',
|
||||
'concatSwRegistration',
|
||||
'generate-service-worker',
|
||||
'buildDistFolder',
|
||||
'cleanup',
|
||||
function(error) {
|
||||
if (error) {
|
||||
|
@@ -7,7 +7,7 @@ ID = "webmaker"
|
||||
# unless otherwise overridden by more specific contexts.
|
||||
[build]
|
||||
# Default build command.
|
||||
command = "gulp dev-release && ls app/preview/"
|
||||
command = "gulp dev-release"
|
||||
|
||||
# Directory to change to before starting a build.
|
||||
# This is where we will look for package.json/.nvmrc/etc.
|
||||
@@ -16,7 +16,7 @@ ID = "webmaker"
|
||||
# Directory (relative to root of your repo) that contains the deploy-ready
|
||||
# HTML files and assets generated by the build. If a base directory has
|
||||
# been specified, include it in the publish directory path.
|
||||
publish = "app"
|
||||
publish = "dist"
|
||||
|
||||
# The following redirect is intended for use with most SPAs that handle
|
||||
# routing internally.
|
||||
|
Reference in New Issue
Block a user