ericmdantas / generator-ng-fullstack

Client, server or fullstack - it's up to you. ng-fullstack gives you the best of the latest.
MIT License
704 stars 103 forks source link

[ng1/tasks/gulp.watch] - Should not watch changes in bower_components #279

Closed ericmdantas closed 7 years ago

ericmdantas commented 7 years ago

As reported by @fernandacanto, when using ng1 + bower and using a module such as angular-i18n, the app page is never fully loaded.

That happens because the watch task is trying to map/watch everything inside bower_components, and that can be very slow/heavy, because some of the folders have way too many .js files - which is the case with angular-i18n.

It turns out this (in tasks/watch):

  _watchable.push(base.DEV + "**/*.js");
  _watchable.push(base.DEV + "**/*.css");
  _watchable.push(base.DEV + "**/*.html");

should be this:

  _watchable.push(`${base.DEV}**/*.js`);
  _watchable.push(`${base.DEV}**/*.css`);
  _watchable.push(`${base.DEV}**/*.html`);
  _watchable.push(`!${base.DEV}bower_components/**/*`);
ericmdantas commented 7 years ago

Solved by 255ee74.

ericmdantas commented 7 years ago

Released 1.9.18 with the fix.

ericmdantas commented 7 years ago

Also released in the next branch.


$ npm i -g generator-ng-fullstack # to download from '1.9' branch

$ npm i -g generator-ng-fullstack@next # to download from 'next' branch