Skip to content

Instantly share code, notes, and snippets.

@bryzettler
Last active June 10, 2020 08:18
Show Gist options
  • Save bryzettler/dde355176d1bd6f452d7c06a19668ba6 to your computer and use it in GitHub Desktop.
Save bryzettler/dde355176d1bd6f452d7c06a19668ba6 to your computer and use it in GitHub Desktop.
const build = () => {
const bundler = new Bundler(paths.appHtml, {
command: 'build',
outDir: paths.appBuild,
publicUrl: './',
cacheDir: './.parcelCache',
// Generate Source Maps for prod
sourceMaps: true,
});
Promise.resolve(bundler.bundle()).then(() => {
copyPublicFolder();
console.log('The ' + chalk.cyan('build') + ' folder is ready to be deployed.');
console.log('You may also serve it locally with a static server:')
console.log();
}).catch((err) => {
printErrors('Failed to compile.', [err]);
process.exit(1);
});
}
build();
@IoannisPetridis
Copy link

Cheers! Much appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment