Remove the need for Bower
kmcgrath opened this issue · 0 comments
Having 2 package managers (npm and bower) is fairly ugly. The project requires gulp and npm and uses bower as a connivence for packaging static asset dependencies.
Although the distribution feels like a static site, there is really no reason to packages assets to be served like they would be over the web. The final project will never be loaded like a web site.
The issue became more apparent with the support of helpers. Helpers will never be run on the client side and should be able to act like a nodejs script. If the helper is discovered within bower_components but uses node to load it's own dependencies, that is just plain ugly.
To remove Bower, assets, templates and helpers will need to be discovered and distributed differently. At the moment this is done by simply looking in the bower_components folder and finding the necessary directories. If Bower is removed then each will need to be discovered by use instead of file system globs.
Instead of:
{{> /path/to/partial}}
"TemplateUrl": "{{s3opts.awsPath}}/path/to/template"
Implement:
{{partial module="module1" path="/path/to/partial"}}
--or--
{{partial (buildPath module="module1" path="path/to/partial") }}
"TemplateUrl": "{{{buildS3Url module="module1" path="path/to/template"}}}"
The above would load and cache the necessary partials and templates on-demand. All necessary files would then be added to the distribution.
Helpers will need to be loaded before the templates begin processing.