Skip to content

Commit

Permalink
Fix esm build
Browse files Browse the repository at this point in the history
  • Loading branch information
garronej committed Nov 26, 2022
1 parent 6e85897 commit 5aac6df
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
35 changes: 17 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,9 @@
"type": "git",
"url": "git://github.com/codegouvfr/react-dsfr.git"
},
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
"module": "dist/lib/index.js",
"exports": {
".": "./dist/lib/index.js",
"./next": "./dist/next.js",
"./mui": "./dist/mui.js",
"./Tabs": "./dist/Tabs.js",
"./Header": "./dist/Header.js",
"./DarkModeSwitch": "./dist/DarkModeSwitch.js",
"./Alert": "./dist/Alert.js"
},
"scripts": {
"build": "ts-node src/scripts/build",
"yarn-link": "ts-node src/scripts/yarn-link.ts",
"build": "ts-node -T src/scripts/build",
"yarn-link": "ts-node -T src/scripts/yarn-link.ts",
"start-cra": "yarn build && yarn yarn-link && ((tsc -w -p src) & (cd test/integration/cra && yarn start))",
"start-next": "yarn build && yarn yarn-link && ((tsc -w -p src) & (cd test/integration/next && yarn dev))",
"start-vite": "yarn build && yarn yarn-link && ((tsc -w -p src) & (cd test/integration/vite && yarn dev))",
Expand All @@ -33,8 +21,7 @@
"grant_exec_perms": "node dist/bin/tools/grant_exec_perms",
"storybook": "yarn build && yarn only-include-used-icons && start-storybook -p 6006",
"build-storybook": "yarn build && yarn only-include-used-icons && build-storybook",
"only-include-used-icons": "node dist/bin/only-include-used-icons.js",
"list-exports": "ts-node src/scripts/list-exports.ts && prettier --write package.json"
"only-include-used-icons": "node dist/bin/only-include-used-icons.js"
},
"bin": {
"copy-dsfr-to-public": "dist/bin/copy-dsfr-to-public.js",
Expand All @@ -50,7 +37,7 @@
},
"husky": {
"hooks": {
"pre-commit": "yarn list-exports && git add package.json && lint-staged -v"
"pre-commit": "ts-node -T src/scripts/list-exports.ts && git add package.json && lint-staged -v"
}
},
"author": "u/garronej",
Expand Down Expand Up @@ -80,7 +67,7 @@
}
},
"dependencies": {
"tsafe": "^1.3.3"
"tsafe": "^1.4.0"
},
"devDependencies": {
"@babel/core": "^7.20.2",
Expand Down Expand Up @@ -128,5 +115,17 @@
"tsd": "^0.24.1",
"typescript": "^4.9.1-beta",
"vitest": "^0.24.3"
},
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
"module": "dist/lib/index.js",
"exports": {
".": "./dist/lib/index.js",
"./next": "./dist/next.js",
"./mui": "./dist/mui.js",
"./Tabs": "./dist/Tabs.js",
"./Header": "./dist/Header.js",
"./DarkModeSwitch": "./dist/DarkModeSwitch.js",
"./Alert": "./dist/Alert.js"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11629,10 +11629,10 @@ tsafe@^1.0.1:
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.0.1.tgz#c8c4eb2d75d1478418a4941307c5dd667fd76d23"
integrity sha512-FgJ1a4rE7YbmW5QIzpsfFl4tsAp0x74FH2bVE6qODb2U8jSrwTr5/ckIazeylme5zXndVbtgKm4BZdqmoGhiPw==

tsafe@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.3.3.tgz#602b77b19658f7681c8317dd9bbe5b4deffda99f"
integrity sha512-IHDgBCqxrEQQEuhpTTeHtiGc5+qTMJYUD6OEl2ogB7wFql3EaGa389LdfiJBMpgIKvCI8tmgMGUw7X2Sv5atXg==
tsafe@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/tsafe/-/tsafe-1.4.0.tgz#06eb4d25600e73a43dfb9391af5ba0b14100740d"
integrity sha512-Tu1qe0djo7eQ1Wcg/b8bezbrfW5yHrUHUEvHynFRo3oDyWd7FxnZOrGWQg+hfk1U1+vk9Z9u0J7JoaY17aBhdw==

tsd@^0.24.1:
version "0.24.1"
Expand Down

0 comments on commit 5aac6df

Please sign in to comment.