-
Notifications
You must be signed in to change notification settings - Fork 581
Node.js API
johnjbarton edited this page Jan 29, 2015
·
2 revisions
The Loader standard came and went. Our implementation remains:
var System = require('./src/node/System.js');
System.import('./test_module.js', {}).then(function(mod) {
assert.equal('test', mod.name);
assert.equal('A', mod.a);
assert.equal('B', mod.b);
assert.equal('C', mod.c);
done();
}).catch(done);
The NodeJS API for compiling is the following:
var api = require('../../../src/node/api');
var result = api.compile('let a = 1;', {blockBinding: true});