Created
October 1, 2017 02:08
Star
You must be signed in to star a gist
Modify the build.js file to include the copy flags step
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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