Skip to content

Commit

Permalink
feat(tabs): Publish also as ES2015 modules
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Oct 5, 2017
1 parent 9a3a5da commit 41415ab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
'use strict';

const target = process.env.BABEL_TARGET;
const modules = target === 'rollup' ? false : 'commonjs';
const output = process.env.BABEL_OUTPUT;
const modules = target === 'rollup' || output === 'esm' ? false : 'commonjs';

const options = {
presets: [['env', { loose: true, modules }], 'react'],
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
examples
lib
dist
esm
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
npm-debug.log
lib/
dist/
esm/
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
"version": "2.0.0",
"description": "React tabs component",
"main": "lib/index.js",
"module": "esm/index.js",
"scripts": {
"clean:commonjs": "rimraf lib",
"clean:umd": "rimraf dist",
"create-github-release": "conventional-github-releaser -p angular",
"build:commonjs": "babel src/ --out-dir lib/ --ignore **/__tests__,**/__mocks__",
"build:esm": "BABEL_OUTPUT=esm babel src/ --out-dir esm/ --ignore **/__tests__,**/__mocks__",
"build:umd": "BABEL_TARGET=rollup yarn rollup -c",
"build": "npm-run-all clean:* --parallel build:*",
"format": "eslint src --fix",
Expand All @@ -30,6 +32,7 @@
},
"files": [
"dist",
"esm",
"lib",
"style"
],
Expand Down

0 comments on commit 41415ab

Please sign in to comment.