Requirejs-compatible library just in 200 lines
JavaScript
Clone or download
Permalink
Failed to load latest commit information.
dest
src
test
.gitignore
.jshintrc
.travis.yml
README.md
bower.json
gulpfile.js
karma.conf.js
package.json

README.md

require-mini Build

Tiny replacement of require.js powered by promises

Overview

It's library with require.js compatible API and full support of plugins. We are focusing on small size and use promises which are native in most browsers. Some of features we don't support for now, but most part of functions works properly. Look at examples in our tests.

Generally you can just switch from original require.js to our require-mini without any code modifications and will get advantage of lesser code which takes time to load. Documentation from require.js also applicable here.

Additionaly, because we are using promises, you will get support of asynchronus defines wihout any plugins

define('userData', ['fetch'], function(fetch) {
   return fetch('/api/profile');
});

Caveats

These features is not supported yet, but you can vote for its resolution

Getting started

via Bower

bower install require-mini --save