axy-define v0.0.2
axy.define()
An implementation of CommonJS modules system for browsers.
This is alpha-version
- GitHub: axyjs/axy-define
- NPM: axy-define
- Author: Oleg Grigoriev
- LICENSE: MIT
The library provides an environment for CommonJS modules. Tries to achieve compatibility with the basic mechanisms of Node.js.
The library is not engaged in assembling the project. See, for example, axy-define-asm.
Requirements
The library does not require any dependencies.
Compatibility
IE 9+ and normal browsers. IE 8 with es5-shim. IE 7 with json-js.
Developed on Node.js 0.12.
Installation
1) Include a single file on the page. axy-define.js or compressed version.
<script src="axy-define.min.js"></script>
2) PROFIT.
Synchronous / Asynchronous
The browser it is not server. Unlike node.js it can not just take a file from the local file system.
By default, it works as follows. All required modules and data statically included on the page load stage. The library creates the virtual file system and modules work with it as with a local FS.
If you need the dynamic loading of modules, you can define the asynchronous loader.
Contents
- Introduction
- Sample
- Virtual File System
- Interface
- Assembling
- Resolving module path
- Core modules
- Global variables
- Asynchronous I/O
- Signals
- Settings
- Plugins
- Sandbox
- Using in Node.js
In addition: