Skip to content

Commit

Permalink
chore(package): support for jsnext:main (#1210)
Browse files Browse the repository at this point in the history
* chore(package): support for jsnext:main

* chore(package): lodash plugin goes back
  • Loading branch information
layershifter authored and levithomason committed Jan 24, 2017
1 parent 8c619da commit 1911865
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"presets": [
"es2015",
"./build/preset-es2015",
"react",
"stage-1"
],
Expand Down
7 changes: 7 additions & 0 deletions build/preset-es2015.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const options = process.env.BABEL_ENV === 'es' ? { modules: false } : {}

module.exports = {
presets: [
['es2015', options],
],
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
"name": "semantic-ui-react",
"version": "0.64.3",
"description": "The official Semantic-UI-React integration.",
"jsnext:main": "dist/es/index.js",
"main": "dist/commonjs/index.js",
"module": "dist/es/index.js",
"files": [
"src",
"dist",
"index.d.ts"
],
"scripts": {
"docs": "gulp docs",
"build": "npm run build:commonjs && npm run build:umd && npm run build:docs",
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:docs",
"prebuild:commonjs": "rimraf dist/commonjs",
"build:commonjs": "babel src -d dist/commonjs && npm run tsd",
"prebuild:es": "rimraf dist/es",
"build:es": "cross-env BABEL_ENV=es babel src -d dist/es",
"prebuild:docs": "npm run build:docs-toc",
"build:dll": "gulp dll",
"build:docs": "gulp build:docs",
Expand Down

0 comments on commit 1911865

Please sign in to comment.