diff --git a/gulpfile.js b/gulpfile.js index 95d5dde..b496527 100644 --- a/gulpfile.js +++ b/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) { diff --git a/netlify.toml b/netlify.toml index 439aa92..317077d 100644 --- a/netlify.toml +++ b/netlify.toml @@ -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.