https://github.com/yuchi/liferay-ng-loader-experiments
Proof of Concept for a Peer-Dependencies-aware Loader
https://github.com/yuchi/liferay-ng-loader-experiments
Last synced: over 1 year ago
JSON representation
Proof of Concept for a Peer-Dependencies-aware Loader
- Host: GitHub
- URL: https://github.com/yuchi/liferay-ng-loader-experiments
- Owner: yuchi
- Created: 2017-03-03T13:48:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-08T05:51:06.000Z (about 9 years ago)
- Last Synced: 2025-01-06T08:46:26.167Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Peer-Dependencies-aware Loader
------------------------------
This is a toy implementation of a module loader which honors Peer Dependencies graphs between packages.
```js
const loader = require('path/to/lib/loader')([ /* list of packages */ ]);
loader.execute('package-name@10.0.0', 'lib/something.js');
```
The APIs are extremely bad. This is just a proof of concept to prove that it is indeed possible to have a flat repository of packages and still honor the packages’ peer dependencies—something that is simply impossible in SystemJS or the EcmaScript Loader Specification.