Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gitaaron/combined_dep
https://github.com/gitaaron/combined_dep
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/gitaaron/combined_dep
- Owner: gitaaron
- Created: 2013-03-21T05:15:42.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-21T05:26:57.000Z (almost 12 years ago)
- Last Synced: 2024-04-14T15:04:43.550Z (9 months ago)
- Language: JavaScript
- Size: 305 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Combined dependencies
This is a spike to think about how to solve the problem of having third party modules depending on a module that is already minified in a base project.
Lets say I create a project (original):
www/
* index.html
* js/
* app/
* subA.js
* app.jswhere app depends on subA.
I then run the optimizer (outputs to hand_off):
node build/r.js -o original/app.build.json
and hand the project off to another developer that proceeds to add their submodule :
cp -R hand_off hand_off_customized
you can see the result of their work under hand_off_customized :
www/
* index.html
* js/* custom_app/
* subB.js
* app.js (includes subA)They update the project to include their 'custom_app' directory and update app to include subB as a dependency.
Will requirejs complain with a 404 if subA is already included in app as a module? Will the optimizer complain?
# Results
This workflow works because app is loaded first. So we should be fine as long as we don't end up with a project structure similar to one found under not_works :
www/
* index.html
* js/
* app/
* subA.js (includes subC)
* custom_app/
* subB.js (depends on subC)
* app.js