Skip to content

Commit

Permalink
feat: TUP-700 @tacc/core-components - publish (#464)
Browse files Browse the repository at this point in the history
* test: move peerDeps to devDeps

To avoid error like:

```
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vite
npm ERR!   dev vite@"^3.0.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^5.0.0" from @nx/[email protected]
npm ERR! node_modules/@nx/vite
npm ERR!   peer @nx/vite@"^17.2.8" from @tacc/[email protected]
npm ERR!   node_modules/@tacc/core-components
npm ERR!     @tacc/core-components@"file:../../tacc-core-components-0.0.1.tgz" from the root project
```

* fix: match root & core-components vite…css version

* fix: move vite…css to devDep

* fix: core-components devDeps

* fix: react-dropzone not a core-components dep yet

* fix: missing @nx/react (thus no css module .d.ts)

* conf: remove NPM scripts cuz they do not work

The commands via `nx` for core-components DO work!

* fix: missing @testing-library/user-event
  • Loading branch information
wesleyboar authored May 21, 2024
1 parent df64ce7 commit 41116e6
Show file tree
Hide file tree
Showing 4 changed files with 1,054 additions and 198 deletions.
8 changes: 4 additions & 4 deletions libs/core-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ Set up a new local CMS instance.

The components are [React components](https://react.dev/learn) that should be [written in TypeScript](https://react.dev/learn/typescript#typescript-with-react-components).

| command | task | service |
| --------------- | ------------------ | ----------------------------- |
| `npm test` | execute unit tests | [Vitest](https://vitest.dev/) |
| `npm run build` | build components | [Vite](https://vitejs.dev/) |
| command | task | service |
| ------------------------------ | ------------------ | ----------------------------- |
| `npx nx test core-components` | execute unit tests | [Vitest](https://vitest.dev/) |
| `npx nx build core-components` | build components | [Vite](https://vitejs.dev/) |

## Contributing

Expand Down
29 changes: 13 additions & 16 deletions libs/core-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@
"files": [
"dist"
],
"scripts": {
"start": "nx serve",
"build": "nx build",
"build:storbook": "nx build-storybook",
"test": "nx test",
"prepublishOnly": "npm run build"
},
"homepage": "https://github.com/TACC/tup-ui/libs/core-components",
"peerDependencies": {
"@nx/vite": "^17.2.8",
"@tacc/core-styles": "^2.25.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"dependencies": {
"formik": "^2.2.9",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-dropzone": "^14.2.3",
"react-resize-detector": "^7.1.2",
"react-router-dom": "6.11.2",
"react-step-wizard": "^5.3.11",
"react-table": "^7.8.0",
"reactstrap": "^9.1.5",
"uuid": "^8.3.2"
},
"devDependencies": {
"@nx/react": "^17.2.8",
"@nx/vite": "^17.2.8",
"@tacc/core-styles": "^2.25.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.5.2",
"@vitejs/plugin-react-swc": "^3.5.0",
"uuid": "^8.3.2",
"vite-plugin-dts": "^2.3.0",
"vite-plugin-lib-inject-css": "^2.1.1",
"vite-tsconfig-paths": "^4.2.0"
},
"sideEffects": [
Expand All @@ -43,8 +43,5 @@
"@storybook/addon-essentials": "^7.6.19",
"@storybook/core-server": "^7.6.19",
"@storybook/react-vite": "^7.6.19"
},
"devDependencies": {
"vite-plugin-lib-inject-css": "^2.1.1"
}
}
Loading

0 comments on commit 41116e6

Please sign in to comment.