Closed mgcrea closed 9 years ago
I need to investigate this more because I thought I already had this working. Am I able to reproduce from the linked repo? If not, can you link me something that I can reproduce from? Thanks.
@mgcrea pinging this thread for my previous questions.
It's a bit long, but you can replicate it like that:
$ npm i -g generator-angular-factory
$ mkdir test-app; cd test-app
$ yo ng-factory
# yes/enter to all
$ gulp serve
# should work with resolved names (might require a gulp-cli#4.0)
comment out [this line](https://github.com/ng-tools/ng-factory/blob/master/lib/config.js#L34) in you `node_modules` folder.
$ gulp serve
# should show <anonymous> lines
To sum things up, latest ng-factory autoloads undertaker registries installed in your app, in this case a generic undertaker-app-tasks that is supposed to be generic and bound to a specialized "factory" of reusable transform streams, by default it's bound to factory-angular-channels to properly build and serve an angular application.
Everything is still quite experimental and only used internally to harmonize gulpfiles accross my teams.
But the objective was to release something that just works out of the box, and is safely upgradable. The need came from me spending way to much time fixing old/broken gulpfiles, or one that would break when you update a module.
this is related to #25 - Not sure the best way to solve it. Still needs some thought put into it.
Can you test against https://github.com/phated/undertaker/commits/registry-init to see if this is still a problem? Using the init
hook should avoid this problem.
@mgcrea pinging
I believe this was closed by https://github.com/phated/undertaker/commit/e7bf5b3602e522e75d7bf964d8b70d9e7fa26a32 - Please reopen if changing to the init
lifecycle hook doesn't solve this problem
I've been playing with https://github.com/phated/undertaker-registry to properly modularize gulp-like workflows.
Somehow when loading tasks from theses registry, they end up as anonymous when used with gulp:
Where it should be:
You can check some of theses registries here: https://github.com/ng-tools/undertaker-app-tasks/tree/master/lib/tasks
I tried to come up with an unit test for this, but the metadata part where this could be checked does seem totally private.
EDIT: I'm using the ConfigRegistry setup showed in your README, maybe the issue is coming from the overriding of the registry set method.
EDIT2: It's not due to that, but can be fixed easily there: