Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 6776e88

Browse files
author
Federico Zivolo
committed
build: Move to babel-preset-stage-1
1 parent 937c5ee commit 6776e88

File tree

4 files changed

+50
-20
lines changed

4 files changed

+50
-20
lines changed

.babelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"presets": [["env", { "modules": false }], "stage-2", "react"],
2+
"presets": [["env", { "modules": false }], "stage-1", "react"],
33
"plugins": ["transform-class-properties"],
44
"env": {
55
"test": {
6-
"presets": ["env", "stage-2", "react"]
6+
"presets": ["env", "stage-1", "react"]
77
}
88
}
99
}

package.json

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,28 @@
33
"version": "1.0.0-beta.1",
44
"description": "React wrapper around Popper.js",
55
"license": "MIT",
6-
"author":
7-
"Travis Arnold <[email protected]> (http://souporserious.com)",
6+
"author": "Travis Arnold <[email protected]> (http://souporserious.com)",
87
"homepage": "https://github.com/souporserious/react-popper",
98
"main": "dist/react-popper.js",
109
"umd:main": "dist/react-popper.umd.js",
1110
"module": "lib/index.js",
1211
"typings": "typings/react-popper.d.ts",
13-
"files": ["dist", "lib", "typings/react-popper.d.ts"],
12+
"files": [
13+
"dist",
14+
"lib",
15+
"typings/react-popper.d.ts"
16+
],
1417
"scripts": {
15-
"build":
16-
"npm run build:clean && npm run build:es && npm run build:umd && npm run build:cjs && npm run build:flow && npm run build:umd-min && npm run build:cjs-min",
18+
"build": "npm run build:clean && npm run build:es && npm run build:umd && npm run build:cjs && npm run build:flow && npm run build:umd-min && npm run build:cjs-min",
1719
"build:clean": "rimraf dist/ && rimraf lib/",
1820
"build:es": "babel src --ignore '*.test.js,__mocks__' --out-dir lib",
19-
"build:umd":
20-
"rollup -c --output.format umd --output.name 'react-popper' --output.file dist/react-popper.umd.js",
21-
"build:cjs":
22-
"rollup -c --output.format cjs --output.name 'react-popper' --output.file dist/react-popper.js",
21+
"build:umd": "rollup -c --output.format umd --output.name 'react-popper' --output.file dist/react-popper.umd.js",
22+
"build:cjs": "rollup -c --output.format cjs --output.name 'react-popper' --output.file dist/react-popper.js",
2323
"build:flow": "flow-copy-source --ignore '{__mocks__/*,*.test}.js' src lib",
24-
"build:umd-min":
25-
"MINIFY=true rollup -c --output.format umd --output.name 'react-popper' --output.file dist/react-popper.umd.min.js",
26-
"build:cjs-min":
27-
"MINIFY=true rollup -c --output.format cjs --output.name 'react-popper' --output.file dist/react-popper.min.js",
24+
"build:umd-min": "MINIFY=true rollup -c --output.format umd --output.name 'react-popper' --output.file dist/react-popper.umd.min.js",
25+
"build:cjs-min": "MINIFY=true rollup -c --output.format cjs --output.name 'react-popper' --output.file dist/react-popper.min.js",
2826
"demo": "parcel --out-dir demo/dist demo/index.html",
29-
"test":
30-
"npm run test:eslint && npm run test:flow && npm run test:ts && npm run test:jest",
27+
"test": "npm run test:eslint && npm run test:flow && npm run test:ts && npm run test:jest",
3128
"test:ts": "tsc --project ./typings/tests",
3229
"test:flow": "flow check",
3330
"test:jest": "jest",
@@ -37,7 +34,9 @@
3734
},
3835
"jest": {
3936
"setupTestFrameworkScriptFile": "<rootDir>jest.setup.js",
40-
"snapshotSerializers": ["enzyme-to-json/serializer"]
37+
"snapshotSerializers": [
38+
"enzyme-to-json/serializer"
39+
]
4140
},
4241
"repository": {
4342
"type": "git",
@@ -75,7 +74,7 @@
7574
"babel-plugin-transform-react-remove-prop-types": "^0.4.13",
7675
"babel-preset-env": "^1.6.1",
7776
"babel-preset-react": "^6.24.1",
78-
"babel-preset-stage-2": "^6.24.1",
77+
"babel-preset-stage-1": "^6.24.1",
7978
"enzyme": "^3.3.0",
8079
"enzyme-adapter-react-16": "^1.1.1",
8180
"enzyme-to-json": "^3.3.3",

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
plugins: [
77
babel({
88
babelrc: false,
9-
presets: [['env', { modules: false }], 'stage-2', 'react'],
9+
presets: [['env', { modules: false }], 'stage-1', 'react'],
1010
plugins: [
1111
'external-helpers',
1212
['transform-react-remove-prop-types', { mode: 'wrap' }],

yarn.lock

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,10 @@ babel-plugin-syntax-async-generators@^6.5.0:
708708
version "6.13.0"
709709
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz#6bc963ebb16eccbae6b92b596eb7f35c342a8b9a"
710710

711+
babel-plugin-syntax-class-constructor-call@^6.18.0:
712+
version "6.18.0"
713+
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz#9cb9d39fe43c8600bec8146456ddcbd4e1a76416"
714+
711715
babel-plugin-syntax-class-properties@^6.8.0:
712716
version "6.13.0"
713717
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de"
@@ -724,6 +728,10 @@ babel-plugin-syntax-exponentiation-operator@^6.8.0:
724728
version "6.13.0"
725729
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
726730

731+
babel-plugin-syntax-export-extensions@^6.8.0:
732+
version "6.13.0"
733+
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz#70a1484f0f9089a4e84ad44bac353c95b9b12721"
734+
727735
babel-plugin-syntax-flow@^6.18.0:
728736
version "6.18.0"
729737
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d"
@@ -756,6 +764,14 @@ babel-plugin-transform-async-to-generator@^6.22.0, babel-plugin-transform-async-
756764
babel-plugin-syntax-async-functions "^6.8.0"
757765
babel-runtime "^6.22.0"
758766

767+
babel-plugin-transform-class-constructor-call@^6.24.1:
768+
version "6.24.1"
769+
resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz#80dc285505ac067dcb8d6c65e2f6f11ab7765ef9"
770+
dependencies:
771+
babel-plugin-syntax-class-constructor-call "^6.18.0"
772+
babel-runtime "^6.22.0"
773+
babel-template "^6.24.1"
774+
759775
babel-plugin-transform-class-properties@^6.24.1:
760776
version "6.24.1"
761777
resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac"
@@ -951,6 +967,13 @@ babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-e
951967
babel-plugin-syntax-exponentiation-operator "^6.8.0"
952968
babel-runtime "^6.22.0"
953969

970+
babel-plugin-transform-export-extensions@^6.22.0:
971+
version "6.22.0"
972+
resolved "https://registry.yarnpkg.com/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz#53738b47e75e8218589eea946cbbd39109bbe653"
973+
dependencies:
974+
babel-plugin-syntax-export-extensions "^6.8.0"
975+
babel-runtime "^6.22.0"
976+
954977
babel-plugin-transform-flow-strip-types@^6.22.0:
955978
version "6.22.0"
956979
resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf"
@@ -1153,6 +1176,14 @@ babel-preset-react@^6.24.1:
11531176
babel-plugin-transform-react-jsx-source "^6.22.0"
11541177
babel-preset-flow "^6.23.0"
11551178

1179+
babel-preset-stage-1@^6.24.1:
1180+
version "6.24.1"
1181+
resolved "https://registry.yarnpkg.com/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz#7692cd7dcd6849907e6ae4a0a85589cfb9e2bfb0"
1182+
dependencies:
1183+
babel-plugin-transform-class-constructor-call "^6.24.1"
1184+
babel-plugin-transform-export-extensions "^6.22.0"
1185+
babel-preset-stage-2 "^6.24.1"
1186+
11561187
babel-preset-stage-2@^6.24.1:
11571188
version "6.24.1"
11581189
resolved "https://registry.yarnpkg.com/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz#d9e2960fb3d71187f0e64eec62bc07767219bdc1"

0 commit comments

Comments
 (0)