You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Introduce a way to override Sprangular's manifest file #161
I would love to be able to do this as it would allow the host app to pick and chose what it wants to load in the code base. The only way right now to not load specific files from Sprangular in the host is by creating empty files, which is less than ideal.
My perfect plan would be to have this very same app.coffee file in the gem like it is now, but still be able to have a app.coffee in the host that will be tailored to the app's needs.
When I try doing this now, there is no way I can reference the gem's file structure and the asset pipeline will try to look in the host app and evidently not find the required files.
Have you considered organizing the various elements of the application into submodules? Either role-specific (ie. catalog vs. account vs. checkout) or architecturally (ie. controllers vs. models vs. services). Then the host apps could define their angular models thus:
It is hard because the way Sprangular "does a lot" and sprockets is pretty dumb compared to something like Webpack/JSPM. Is there any thought of a big olé generator of sorts. Much like Ember Rails?
Yeah, my solution only addresses giving host apps some flexibility in terms of substituting their own components. Reducing the number of files being delivered by the AP is whole other kettle of fish.
@DanielWright Actually had not though of doing it that way. That would be a good idea. I will backburn this for a while but it would be super interesting to do it this way. Thanks guys for the brainstorm.
Activity
simonwalsh commentedon May 19, 2015
@joshnuss @bryanmtl @braidn any thoughts ?
DanielWright commentedon May 19, 2015
Have you considered organizing the various elements of the application into submodules? Either role-specific (ie. catalog vs. account vs. checkout) or architecturally (ie. controllers vs. models vs. services). Then the host apps could define their angular models thus:
Host apps would then be able to choose whether to use Sprangular's in-built modules, extend/overwrite them, or go BYO.
braidn commentedon May 19, 2015
It is hard because the way Sprangular "does a lot" and sprockets is pretty dumb compared to something like Webpack/JSPM. Is there any thought of a big olé generator of sorts. Much like Ember Rails?
https://github.com/emberjs/ember-rails/tree/master/lib/generators/templates
Although, I wonder if there is a way to do it through Angular's module "injection" like mentioned by DW?
DanielWright commentedon May 19, 2015
Yeah, my solution only addresses giving host apps some flexibility in terms of substituting their own components. Reducing the number of files being delivered by the AP is whole other kettle of fish.
simonwalsh commentedon May 19, 2015
@DanielWright Actually had not though of doing it that way. That would be a good idea. I will backburn this for a while but it would be super interesting to do it this way. Thanks guys for the brainstorm.