summaryrefslogtreecommitdiff
path: root/support/build
diff options
context:
space:
mode:
authorAlex Early <alexander.early@gmail.com>2019-05-19 19:16:37 -0700
committerGitHub <noreply@github.com>2019-05-19 19:16:37 -0700
commite19cee4ca8a5d7feb2e3cfeb1d10f028643786f1 (patch)
tree76e6681c3c366c8e0a6dc58ce74856ca8fc3ee9c /support/build
parent902b8d0c82308c94b827bad7f597f516bd2b50c6 (diff)
downloadasync-e19cee4ca8a5d7feb2e3cfeb1d10f028643786f1.tar.gz
feat: Add .mjs bundle and pkg.main to CJS build (#1642)
* feat: add mjs bundle and pkg.main to CJS build * update docs
Diffstat (limited to 'support/build')
-rw-r--r--support/build/aggregate-module.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/support/build/aggregate-module.js b/support/build/aggregate-module.js
new file mode 100644
index 0000000..804f591
--- /dev/null
+++ b/support/build/aggregate-module.js
@@ -0,0 +1,15 @@
+const {rollup} = require('rollup');
+const nodeResolve = require('rollup-plugin-node-resolve');
+
+rollup({
+ input: 'build-es/index.js',
+ plugins: [ nodeResolve() ]
+})
+ .then(( bundle ) => {
+ return bundle.write({
+ format: 'esm',
+ name: 'async',
+ file: 'build/async.mjs'
+ });
+ })
+ .catch((err) => { throw err; });