Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Modify the build.js file to include the copy flags step
import gulp from 'gulp';
import {CLIOptions, build as buildCLI} from 'aurelia-cli';
import transpile from './transpile';
import processMarkup from './process-markup';
import processCSS from './process-css';
import copyFiles from './copy-files';
import watch from './watch';
import project from '../aurelia.json';
import copyFlags from './copy-flags';
let build = gulp.series(
readProjectConfiguration,
gulp.parallel(
transpile,
processMarkup,
processCSS,
copyFiles,
copyFlags
),
writeBundles
);
let main;
if (CLIOptions.taskName() === 'build' && CLIOptions.hasFlag('watch')) {
main = gulp.series(
build,
(done) => { watch(); done(); }
);
} else {
main = build;
}
function readProjectConfiguration() {
return buildCLI.src(project);
}
function writeBundles() {
return buildCLI.dest();
}
export { main as default };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment