Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 721 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 721 Bytes

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);