Skip to content

Commit

Permalink
Add esm module option to package
Browse files Browse the repository at this point in the history
  • Loading branch information
David White committed Jun 15, 2019
1 parent 84f0207 commit a79230c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ async function bundleJavaScript() {
await bundle.write({
format: 'umd',
name: 'beedle',
file: 'beedle.umd.js',
dir: `${__dirname}/dist/`,
});

await bundle.write({
format: 'esm',
name: 'beedle',
file: 'beedle.js',
dir: `${__dirname}/dist/`,
});
Expand Down
2 changes: 1 addition & 1 deletion dist/beedle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/beedle.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "beedle",
"version": "0.7.3",
"description": "Beedle is a tiny little library to help you manage state across your application. Inspired by great libraries like Vuex and Redux, Beedle creates a central store that enables you to both better control and cascade state across your application.",
"main": "dist/beedle.js",
"main": "dist/beedle.umd.js",
"module": "dist/beedle.js",
"scripts": {
"test": "mocha --require babel-core/register || true",
"build": "node bundler.js"
Expand Down

0 comments on commit a79230c

Please sign in to comment.