0.0.22 • Published 6 years ago
betajs-scoped v0.0.22
betajs-scoped 0.0.22
BetaJS-Scoped is a small module for scoped loading of modules and dependencies.
Getting Started
You can use the library in the browser, in your NodeJS project and compile it as well.
Browser
<script src="betajs-scoped/dist/scoped.min.js"></script>NodeJS
var Scoped = require('betajs-scoped/dist/scoped.js');Compile
git clone https://github.com/betajs/betajs-scoped.git
npm install
gruntBasic Usage
(function () {
var Scoped = this.subScope();
Scoped.binding("module", "global:MyLibrary");
Scoped.binding("dependency1", "global:ExternalDependency1");
Scoped.binding("dependency2", "global:ExternalDependency2");
// Library code
}).call(Scoped);Scoped.require(['ns1:dependency1', 'ns2:dependency2', 'ns3:dependency3'], function (D1, D2, D3) {
// Execute once D1, D2, D3 are resolved.
});
Scoped.define('ns:module', ['ns1:dependency1', 'ns2:dependency2', 'ns3:dependency3'], function (D1, D2, D3) {
// Execute once D1, D2, D3 are resolved.
return {
// Return ns:module definition.
};
});
Scoped.extend('ns:module', ['ns1:dependency1', 'ns2:dependency2', 'ns3:dependency3'], function (D1, D2, D3) {
// Execute once D1, D2, D3 are resolved.
return {
// Return ns:module extension.
};
});Links
| Resource | URL |
|---|---|
| Homepage | https://betajs.com |
| Git | git://github.com/betajs/betajs-scoped.git |
| Repository | https://github.com/betajs/betajs-scoped |
| Blog | https://blog.betajs.com |
| https://twitter.com/thebetajs | |
| Gitter | https://gitter.im/betajs/betajs-scoped |
Compatability
| Target | Versions |
|---|---|
| Firefox | 3 - Latest |
| Chrome | 18 - Latest |
| Safari | 4 - Latest |
| Opera | 12 - Latest |
| Internet Explorer | 6 - Latest |
| Edge | 12 - Latest |
| Yandex | Latest |
| iOS | 3.0 - Latest |
| Android | 4.4 - Latest |
| NodeJS | 4.0 - Latest |
CDN
| Resource | URL |
|---|---|
| scoped.js | http://cdn.rawgit.com/betajs/betajs-scoped/master/dist/scoped.js |
| scoped.min.js | http://cdn.rawgit.com/betajs/betajs-scoped/master/dist/scoped.min.js |
Unit Tests
| Resource | URL |
|---|---|
| Test Suite | Run |
Weak Dependencies
| Name | URL |
|---|---|
| betajs-shims | Open |
Main Contributors
- Oliver Friedmann
License
Apache-2.0
Sponsors
- Ziggeo
- Browserstack
0.0.22
6 years ago
0.0.21
7 years ago
0.0.20
7 years ago
0.0.19
8 years ago
0.0.18
8 years ago
0.0.17
8 years ago
0.0.16
8 years ago
0.0.15
9 years ago
0.0.14
9 years ago
0.0.13
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
9 years ago
0.0.9
10 years ago
0.0.8
10 years ago
0.0.7
10 years ago
0.0.6
10 years ago
0.0.5
10 years ago
0.0.3
10 years ago