Skip to content

Commit

Permalink
Add es module file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vestride committed Feb 20, 2018
1 parent 1f7f8bf commit 47c8ce6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ _site
.sass-cache
.jekyll-metadata
*.scssc
*.esm.js
*.esm.js.map

# https://github.com/sindresorhus/ama/issues/479#issuecomment-310661514
package-lock.json
16 changes: 16 additions & 0 deletions gulp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ module.exports.configs = [
],
},

{
input: entry,
output: {
name: moduleName,
file: './dist/shuffle.esm.js',
sourcemap,
format: 'es',
},
cache: undefined,
plugins: [
resolve(),
commonjs(commonjsOptions),
babel(babelOptions),
],
},

{
input: entry,
output: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"tiles"
],
"main": "dist/shuffle.js",
"module": "dist/shuffle.esm.js",
"moduleSource": "src/shuffle.js",
"types": "index.d.ts",
"scripts": {
Expand Down

0 comments on commit 47c8ce6

Please sign in to comment.