https://github.com/sinclairzx81/typescript-amd
An implementation of the amd specification in typescript.
https://github.com/sinclairzx81/typescript-amd
Last synced: over 1 year ago
JSON representation
An implementation of the amd specification in typescript.
- Host: GitHub
- URL: https://github.com/sinclairzx81/typescript-amd
- Owner: sinclairzx81
- License: other
- Created: 2016-06-19T02:31:36.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-07-13T04:14:17.000Z (almost 10 years ago)
- Last Synced: 2024-10-03T08:06:56.577Z (almost 2 years ago)
- Language: JavaScript
- Size: 78.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# amd-ts
An implementation of the amd specification in typescript.
```html
amd.ready(function() {
// DOM is ready
})
amd.include(["./script1.js", "./script2.js"], function() {
// non AMD modules loaded
})
amd.require(["./app", "./services"], function(app, services) {
// AMD modules loaded.
})
```
## overview
amd-ts is an implementation of the [asynchronous module definition](https://github.com/amdjs/amdjs-api/blob/master/AMD.md)
spec written in typescript. The library closely aligns with typescript AMD conventions but can be used to import
any AMD compatible javascript module. This libraries intent is to be a simple, zero configuration AMD loader with some additional
support for loading non AMD modules into the global scope for convenience.
amd-ts is offered as is, to be added to an existing typescript project or to be compiled and used as a out of the box AMD module loader.
## building from source
amd-ts requires the typescript compiler. The project can be build in the following way.
```
npm install typescript -g
node tasks build
```
alternatively..
```
tsc -p ./src/tsconfig.json --outFile ./bin/amd.js
```