Skip to content

Commit

Permalink
Use @babel/cli to build the library
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottsj committed Nov 20, 2019
1 parent d1f8933 commit ffb09ba
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"presets": [
"@babel/preset-env",
"@babel/preset-react",
{
"plugins": ["@babel/plugin-proposal-class-properties"]
},
"@emotion/babel-preset-css-prop"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
]
}
10 changes: 10 additions & 0 deletions .storybook/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
{
"plugins": ["@babel/plugin-proposal-class-properties"]
},
"@emotion/babel-preset-css-prop"
]
}
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
"license": "MIT",
"author": "David Tang",
"private": false,
"main": "dist/bundle.js",
"main": "lib/index.js",
"sideEffects": false,
"browserslist": "> 0.25%, not dead",
"browserslist": [
"maintained node versions",
"> 0.25%",
"not dead"
],
"keywords": [
"react",
"loading",
Expand All @@ -18,12 +22,11 @@
"type": "git",
"url": "https://github.com/dvtng/react-loading-skeleton.git"
},
"typings": "./dist/index.d.ts",
"scripts": {
"start": "yarn run storybook",
"test": "jest",
"build": "webpack",
"storybook": "start-storybook -p 8080 -c .storybook",
"build": "babel src --out-dir lib --delete-dir-on-start --copy-files",
"storybook": "start-storybook -p 8080",
"prepublishOnly": "yarn run build"
},
"jest": {
Expand All @@ -38,6 +41,7 @@
"react": "^15.6.1 || ^16.0.0"
},
"devDependencies": {
"@babel/cli": "^7.6.2",
"@babel/core": "^7.6.2",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/preset-env": "^7.6.2",
Expand Down

0 comments on commit ffb09ba

Please sign in to comment.