-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: use preconstruct to manage monorepo #37
Changes from 4 commits
70d37ae
ae88e9a
98486a5
5093ff3
53b5737
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Thunderstore UI | ||
|
||
## Monorepo Setup | ||
|
||
- [`yarn` workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) for | ||
managing the packages in the monorepo (see `packages` key in base | ||
`package.json` file) | ||
- [`preconstruct`](https://preconstruct.tools/) tool takes a lot of the pain | ||
out of managing a monorepo | ||
- code behaves the same in dev as it will in production | ||
Comment on lines
+8
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels a bit 3rd person/an extract from the docs instead of more of a guide/explanation of how the tool works with/is used in the repo |
||
- packages linked locally via `preconstruct dev` (runs automatically in | ||
`postinstall` hook) without needing to manually build anything | ||
Comment on lines
+11
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
From preconstruct's docs:
Where is this actually setup? |
||
- `nextjs` workspace uses `@preconstruct/next` plugin to integrate | ||
Comment on lines
+8
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe this could include some documentation on exactly how to setup the project from after |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
presets: [ | ||
"@babel/preset-typescript", | ||
"@babel/preset-react", | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
modules: false, | ||
loose: true, | ||
}, | ||
], | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const withPreconstruct = require("@preconstruct/next"); | ||
|
||
module.exports = withPreconstruct(); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,18 @@ | |
"version": "0.1.0", | ||
"description": "Shared components for Thunderstore", | ||
"repository": "https://github.com/thunderstore-io/thunderstore-ui/tree/master/thunderstore-components", | ||
"scripts": { | ||
"build": "tsc", | ||
"dev": "tsc --watch" | ||
}, | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "dist/thunderstore-components.cjs.js", | ||
"module": "dist/thunderstore-components.esm.js", | ||
"dependencies": { | ||
"@chakra-ui/react": "^1.3.3", | ||
"@emotion/react": "^11.1.5", | ||
"@emotion/styled": "^11.1.5", | ||
"framer-motion": "^3.10.0", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
Comment on lines
+16
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why doesn't this need to be part of |
||
"react-hook-form": "^6.15.4" | ||
}, | ||
"devDependencies": {} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows us to use
require
statements in.js
files, which I imagine will mostly be configuration files for this project.