Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
prepublish babel script
  • Loading branch information
jscottsmith committed Mar 7, 2019
1 parent ecd86bc commit 74f5377
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
32 changes: 17 additions & 15 deletions .babelrc
@@ -1,14 +1,4 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": false,
"browserslist": "> 0.25%, not dead"
}
],
"@babel/preset-react"
],
"env": {
"test": {
"presets": [
Expand All @@ -17,11 +7,23 @@
{
"modules": "commonjs"
}
],
"@babel/preset-react"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
]
]
},
"production": {
"presets": [
[
"@babel/preset-env",
{
"modules": "commonjs"
}
]
]
}
},
"plugins": ["@babel/plugin-proposal-export-default-from"]
"presets": ["@babel/preset-react"],
"plugins": [
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-class-properties"
]
}
16 changes: 9 additions & 7 deletions .gitignore
@@ -1,8 +1,10 @@
node_modules
coverage
dist
build
npm-debug.log
lib
.cache
/.cache
/build
/cjs
/coverage
/dist
/esm
/node_modules
/yarn-error.log

npm-debug.log
9 changes: 7 additions & 2 deletions package.json
Expand Up @@ -6,14 +6,19 @@
"type": "git",
"url": "https://github.com/jscottsmith/react-scroll-parallax"
},
"main": "lib/index.js",
"main": "./cjs/index.js",
"browserslist": [
"last 2 version",
"> 1%",
"not dead"
],
"scripts": {
"start": "yarn storybook",
"test": "BABEL_ENV=test jest",
"test:watch": "BABEL_ENV=test jest --watch",
"lint": "eslint ./src ./__tests__",
"prettier": "prettier --tab-width 4 --single-quote --trailing-comma es5 --print-width 80 --write \"{src,examples,__tests__}/**/**/**/*.js\"",
"todo:prepublish": "babel ./src --out-dir ./lib --presets es2015,react,stage-0 --plugins babel-plugin-add-module-exports",
"prepublishOnly": "BABEL_ENV=production babel ./src --out-dir ./cjs",
"storybook": "start-storybook -p 3000",
"storybook:build": "build-storybook",
"storybook:export": "build-storybook -c .storybook -o build",
Expand Down

0 comments on commit 74f5377

Please sign in to comment.