Skip to content

Commit

Permalink
gh-440: Remove env vars to allow building on windows without issues
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrowd committed May 6, 2020
1 parent 27cbd6e commit a071604
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 14 deletions.
13 changes: 1 addition & 12 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
module.exports = {
presets: [
[
'@babel/env',
{
modules: process.env.MODULE ? false : 'commonjs',
targets: ['last 2 versions', 'not dead'],
},
],
'@babel/preset-react',
'@babel/preset-typescript',
],
plugins: ['@babel/plugin-proposal-class-properties'],
extends: './babel.config.cjs.json',
};
12 changes: 12 additions & 0 deletions babel.config.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./babel.config.json",
"presets": [
[
"@babel/env",
{
"modules": "commonjs",
"targets": ["last 2 versions", "not dead"]
}
]
]
}
14 changes: 14 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
[
"@babel/env",
{
"modules": false,
"targets": ["last 2 versions", "not dead"]
}
],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"update-snapshots": "jest --updateSnapshot",
"build": "yarn lib:build",
"lib:build": "yarn lib:build-cjs && yarn lib:build-es && yarn lib:build-styles && yarn lib:build-types",
"lib:build-cjs": "babel ./src -d lib/cjs --ignore './src/__tests__'",
"lib:build-es": "MODULE=true babel ./src -d lib/es --ignore './src/__tests__'",
"lib:build-cjs": "babel ./src -d lib/cjs --ignore './src/__tests__' --extensions '.ts,.tsx' --config-file ./babel.config.cjs.json",
"lib:build-es": "babel ./src -d lib/es --ignore './src/__tests__' --extensions '.ts,.tsx' --config-file ./babel.config.json",
"lib:build-styles": "mkdir -p lib/styles && node-sass src/carousel.scss > lib/styles/carousel.css && node-sass --output-style compressed src/carousel.scss > lib/styles/carousel.min.css",
"lib:build-types": "tsc -p tsconfig.types.json",
"lib:pre-publish": "npm version patch && git push origin master",
Expand Down

0 comments on commit a071604

Please sign in to comment.