node-dynamic-import
light rollup based import function for es modules in node
Last updated 2 years ago by hugov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install node-dynamic-import 
SYNC missed versions from official npm registry.

node-dynamic-import

lighter rollup-based import function for es modules in node

var esImport = require('./es-import')

Promise.all([
  esImport('./test-default'),
  esImport('./test-named')
]).then(function(arr) {
  var plus2 = arr[0],
      times3 = arr[1].times3,
      result = times3(plus2(1))
  if (result === 9) console.log('TEST PASSED')
  else throw Error('import failed')
})

The more complete and tested node-es-module-loader uses babel (over 3000 files and 1000 folders). This modules provides a lighter alternative for unit testing of individual modules in projects that use rollup instead.

MIT © Hugo Villeneuve

Current Tags

  • 0.2.0                                ...           latest (2 years ago)

4 Versions

  • 0.2.0                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 11
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |