[NPMCLI-38] Use resources from other npm packages in one module Created: 20/Jul/16 Updated: 27/Feb/17 Resolved: 14/Feb/17 |
|
| Status: | Closed |
| Project: | Magnolia CLI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Robert Kowalski |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Template: |
|
||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||
| Epic Link: | CLI: Resource handling | ||||||||||||
| Sprint: | Basel 83 | ||||||||||||
| Story Points: | 1 | ||||||||||||
| Description |
|
It should be easy to setup a single light module so that it uses web resources from other npm packages. For example if I want to create a light module which provides a component which provides a carousel based on "slick-carousel" (https://www.npmjs.com/package/slick-carousel), my new component should not need to copy and include the web resources of this other module - it should be able to simply depend on this other package, and somehow specify which of its resources it needs. Reasoning: Example of a light module that could use this: https://www.npmjs.com/package/responsive-image-component Background: Note: Conclusion: |
| Comments |
| Comment by Christopher Zimmermann [ 20/Jul/16 ] |
|
Its also possible that a solution could be implemented in magnolia itself, or via a new special resources function - ie perhaps the CLI does not need to perform a task. |
| Comment by Christopher Zimmermann [ 20/Jul/16 ] |
|
For example - what if a module configured the location of the needed resources in the node_modules directory, and a resources templating function read that configuration and inserted proper HTML for them.
js:
jquery: node_modules/jquery/dist/jquery.js
|
| Comment by Christopher Zimmermann [ 14/Feb/17 ] |
|
Conclusion in description. |