sync-import

0.0.3 • Public • Published

Allows SystemJS users to syncronously import a pre-bundled module. It achieves this by using the synchronous-inspection feature of Bluebird together with a forced synchronous-resolution mechanism that we add ourselves.

The upshot of this is that, whereas you might normally import a module with SystemJS like this:

var System = require('systemjs');
 
System.import('some-module').then(function(m) {
    console.log(m);
});

you can instead write synchronous code like this:

var syncImport = require('sync-import');
 
var m = syncImport('some-module');
console.log(m);

Package Sidebar

Install

npm i sync-import

Weekly Downloads

3

Version

0.0.3

License

none

Last publish

Collaborators

  • dchambers