Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atmajs/includejs
Resource Loader •js •css •ajax •imgs
https://github.com/atmajs/includejs
Last synced: 6 days ago
JSON representation
Resource Loader •js •css •ajax •imgs
- Host: GitHub
- URL: https://github.com/atmajs/includejs
- Owner: atmajs
- Created: 2012-08-28T12:57:42.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-09-04T10:44:32.000Z (2 months ago)
- Last Synced: 2024-11-04T11:04:37.691Z (10 days ago)
- Language: JavaScript
- Homepage: http://atmajs.com/include
- Size: 2.06 MB
- Stars: 6
- Watchers: 5
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### IncludeJS
_The Resource Loader for Browsers and NodeJS_ with `AMD` and `CommonJS` support.
[![Build Status](https://travis-ci.org/atmajs/IncludeJS.svg?branch=master)](https://travis-ci.org/atmajs/IncludeJS)
[![NPM version](https://badge.fury.io/js/includejs.svg)](http://badge.fury.io/js/includejs)
[![Bower version](https://badge.fury.io/bo/includejs.svg)](http://badge.fury.io/bo/includejs)Features:
- Loads any content: scripts, styles, ajax
- Development friendly: incremental builds are not required
- **ES6 Imports**
- Production: Build the application into single html, js and css @see the [app-bundler](https://github.com/atmajs/app-bundler)
- Inline Dependency Declaration
_No external files, such as package.json or config.js_
- Load any javascript
- No prerequests for module declaration. But supports also `CommonJS` and `include.exports`- Namespaced routing
```javascript
include
.routes({ controller: '/src/controllers/{0}.js' });
//...
include
.js({controller: 'user' });
```
- Parameterized include
```javascript
// foo.js
include.js({ compo: 'baz?color=green' });
// baz.js
document.body.style.backgroundColor = include.iparams.color
```
- Javascript Aliases
```javascript
include.js('myScript.js::Logger').done(function(response){
response.Logger.logMe();
});
```
- Custom Loader Support- Lazy Modules
_Scripts will be evaluated only when you needs them_
- Pause resource loading
```javascript
// pause current module
var resume = include.pause();
someAsyncJob(function(){
// resume with exports example
resume({ baz: 'quux' });
})
```----
:copyright: 2014 Atma.js Project