Skip to content

dchambers/sync-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Synchronous import of modules for SystemJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published