https://github.com/stealjs/system-define
System.define, done right
https://github.com/stealjs/system-define
Last synced: 4 months ago
JSON representation
System.define, done right
- Host: GitHub
- URL: https://github.com/stealjs/system-define
- Owner: stealjs
- License: mit
- Created: 2015-12-23T18:24:42.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-06-18T21:26:47.000Z (over 6 years ago)
- Last Synced: 2025-05-22T07:18:03.872Z (8 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://travis-ci.org/stealjs/system-define)
[](http://badge.fury.io/js/system-define)
# system-define
A better version of the `System.define` function than what is currently available. Has the following advantages:
* Registers a `moduleName` as providing a given `source` and then returns that source when `moduleName` is imported.
* Doesn't prematurely instantiate or execute the module like System.define.
This is implemented as an extension for [StealJS](http://stealjs.com/) currently.
## Usage
For backwards compatibility this extension does not overwrite System.define but instead creates a System._define. The goal is that when the new spec is released (without a System.define), this will be renamed to System.define (or System.loader.define or whatever).
## License
MIT