Description
I'm submitting a ... (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see use [gitter](https://gitter.im/mgechev/angular2-seed) or [stackoverflow](https://stackoverflow.com/questions/tagged/angular2)
Current behavior
After kicking off a local development build using npm start
there is an issue when making changes to more than one source file (html in particular). The build process detects code changes, but fails to copy over all the changes to the Config.APP_DEST
folder (in this case dist/dev
) .
The issue is a timing issue. Sometimes the 'build.assets.dev' gulp task is kicked off before all files have been saved, in my case, by IntelliJ. As a result, not all "saved" files (or will be saved once the save is complete) are copied over. This can be proved by setting a breakpoint in build.assets.dev.ts
as shown below:
export =
class BuildAssetsTask extends AssetsTask {
run() {
let paths: string[] = [
join(Config.APP_SRC, '**'),
'!' + join(Config.APP_SRC, '**', '*.ts'),
'!' + join(Config.APP_SRC, '**', '*.scss'),
'!' + join(Config.APP_SRC, '**', '*.sass')
].concat(Config.TEMP_FILES.map((p) => { return '!' + p; }));
// Setting the breakpoint here which will give the IDE time to save all the files. Once all
// the files have been saved they will be copied over properly (in this case to
// 'dist/dev'.) But if you take off the breakpoint, it's possible that not all the files
// have been saved before this task is invoked.
debugger;
return gulp.src(paths)
.pipe(gulp.dest(Config.APP_DEST));
}
};
Expected behavior
Once one or more source files (html) are changed AND all of them have been saved by the IDE/editor/etc. they should be consumable by the browser.
Minimal reproduction of the problem with instructions
see above
Please tell us about your environment: Windows 10, IntelliJ, brower-sync.
- Angular Seed Version:
3f33d41
- Node:
node --version
= 3.10.8