1
0
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:
Kushagra Gour
2019-02-28 22:53:29 +05:30
parent 1103950696
commit 52138ada4a
2 changed files with 17 additions and 2 deletions

View File

@@ -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() { gulp.task('cleanup', function() {
return child_process.execSync('rm -rf build'); return child_process.execSync('rm -rf build');
}); });
@@ -236,6 +250,7 @@ gulp.task('dev-release', function(callback) {
'useRef', 'useRef',
'concatSwRegistration', 'concatSwRegistration',
'generate-service-worker', 'generate-service-worker',
'buildDistFolder',
'cleanup', 'cleanup',
function(error) { function(error) {
if (error) { if (error) {

View File

@@ -7,7 +7,7 @@ ID = "webmaker"
# unless otherwise overridden by more specific contexts. # unless otherwise overridden by more specific contexts.
[build] [build]
# Default build command. # Default build command.
command = "gulp dev-release && ls app/preview/" command = "gulp dev-release"
# Directory to change to before starting a build. # Directory to change to before starting a build.
# This is where we will look for package.json/.nvmrc/etc. # 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 # 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 # HTML files and assets generated by the build. If a base directory has
# been specified, include it in the publish directory path. # 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 # The following redirect is intended for use with most SPAs that handle
# routing internally. # routing internally.