Skip to content

Commit f481a36

Browse files
authored
Merge pull request #152 from Developer-DAO/clean-up-and-fix-build-setup
2 parents 0940073 + 8ff426c commit f481a36

File tree

10 files changed

+85
-101
lines changed

10 files changed

+85
-101
lines changed

babel.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const BABEL_ENV = process.env.BABEL_ENV;
2+
const cjs = BABEL_ENV === 'cjs';
3+
4+
module.exports = {
5+
presets: [
6+
'@babel/preset-env',
7+
'@babel/preset-typescript',
8+
'@babel/preset-react',
9+
],
10+
plugins: ['@babel/plugin-transform-runtime'],
11+
};

package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@web3-ui/root",
33
"license": "MIT",
44
"version": "0.0.0",
5-
"private": "true",
5+
"private": true,
66
"engines": {
77
"node": ">=16.0.0",
88
"yarn": "^1.5"
@@ -15,10 +15,7 @@
1515
"scripts": {
1616
"prepare": "husky install",
1717
"format": "prettier --write",
18-
"build:components": "yarn workspace @web3-ui/components build",
19-
"build:hooks": "yarn workspace @web3-ui/hooks build",
20-
"build:core": "yarn workspace @web3-ui/core build",
21-
"build": "yarn build:components && yarn build:hooks && yarn build:core",
18+
"build": "preconstruct build",
2219
"test": "jest",
2320
"test:watch": "yarn test --watch",
2421
"test:coverage": "jest --coverage --colors",
@@ -29,8 +26,7 @@
2926
"chromatic": "chromatic --exit-zero-on-changes",
3027
"publish:npm": "yarn changeset publish"
3128
},
32-
"devDependencies": {
33-
"@babel/cli": "^7.16.0",
29+
"dependencies": {
3430
"@babel/core": "^7.16.0",
3531
"@babel/preset-env": "^7.16.4",
3632
"@babel/preset-react": "^7.16.0",

packages/components/.babelrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/components/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"dist"
3030
],
3131
"scripts": {
32-
"build": "preconstruct build",
3332
"format": "prettier --write \"src/**/*.{ts,tsx,json,js,jsx}\"",
3433
"format:check": "prettier --list-different \"src/**/*.{ts,tsx,json,js,jsx}\"",
3534
"prepublishOnly": "yarn build && cp ../../LICENSE ./LICENSE"
@@ -38,7 +37,7 @@
3837
"module": "dist/web3-ui-components.esm.js",
3938
"types": "dist/web3-ui-components.cjs.d.ts",
4039
"dependencies": {
41-
"@babel/runtime": "^7.16.3",
40+
"@babel/runtime": "^7.16.7",
4241
"@chakra-ui/icons": "^1.1.1",
4342
"@chakra-ui/react": "^1.7.2",
4443
"@emotion/react": "^11",
@@ -51,7 +50,6 @@
5150
"react-dom": "*"
5251
},
5352
"devDependencies": {
54-
"@babel/core": "^7.12.7",
5553
"@storybook/react": "^6.3.12",
5654
"@types/jest": "^26.0.15",
5755
"@types/node": "^16.11.9",

packages/core/.babelrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/core/package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"dist"
3131
],
3232
"scripts": {
33-
"build": "preconstruct build",
3433
"format": "prettier --write \"src/**/*.{ts,tsx,json,js,jsx}\"",
3534
"format:check": "prettier --list-different \"src/**/*.{ts,tsx,json,js,jsx}\"",
3635
"prepublishOnly": "yarn build && cp ../../LICENSE ./LICENSE"
@@ -39,21 +38,20 @@
3938
"module": "dist/web3-ui-core.esm.js",
4039
"types": "dist/web3-ui-core.cjs.d.ts",
4140
"dependencies": {
42-
"@babel/runtime": "^7.16.3",
41+
"@babel/runtime": "^7.16.7",
4342
"@chakra-ui/react": "^1.7.2",
4443
"@emotion/react": "^11",
4544
"@emotion/styled": "^11",
46-
"framer-motion": "^4",
4745
"@web3-ui/components": "^0.4.0",
48-
"@web3-ui/hooks": "^0.8.1"
46+
"@web3-ui/hooks": "^0.8.1",
47+
"framer-motion": "^4"
4948
},
5049
"peerDependencies": {
50+
"ethers": "^5.5.1",
5151
"react": "*",
52-
"react-dom": "*",
53-
"ethers": "^5.5.1"
52+
"react-dom": "*"
5453
},
5554
"devDependencies": {
56-
"@babel/core": "^7.12.7",
5755
"@storybook/react": "^6.3.12",
5856
"@types/classnames": "^2.2.11",
5957
"@types/jest": "^26.0.15",

packages/hooks/.babelrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/hooks/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"dist"
3030
],
3131
"scripts": {
32-
"build": "preconstruct build",
3332
"format": "prettier --write \"src/**/*.{ts,tsx,json,js,jsx}\"",
3433
"format:check": "prettier --list-different \"src/**/*.{ts,tsx,json,js,jsx}\"",
3534
"test": "jest --maxWorkers=2",
@@ -41,7 +40,7 @@
4140
"module": "dist/web3-ui-hooks.esm.js",
4241
"types": "dist/web3-ui-hooks.cjs.d.ts",
4342
"dependencies": {
44-
"@babel/runtime": "^7.16.3",
43+
"@babel/runtime": "^7.16.7",
4544
"@walletconnect/web3-provider": "^1.6.6",
4645
"ethers": "^5.5.1",
4746
"web3modal": "^1.9.4"
@@ -51,7 +50,6 @@
5150
"react-dom": ">=16.8.0"
5251
},
5352
"devDependencies": {
54-
"@babel/core": "^7.12.7",
5553
"@portis/web3": "^4.0.6",
5654
"@storybook/addon-actions": "^6.4.0",
5755
"@storybook/addon-essentials": "^6.4.0",

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"noImplicitReturns": true,
1414
"noUnusedLocals": true,
1515
"noUnusedParameters": false,
16-
"outDir": "./dist",
1716
"pretty": true,
1817
"sourceMap": true,
1918
"strict": true,

0 commit comments

Comments
 (0)