Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deptno/typescript-monorepo-cra-example
TypeScript@3 monorepo example CRA version
https://github.com/deptno/typescript-monorepo-cra-example
cra example monorepo monorepo-example typescript typescript-monorepo typescript-monorepo-cra typescript-monorepo-example workspaces
Last synced: about 2 months ago
JSON representation
TypeScript@3 monorepo example CRA version
- Host: GitHub
- URL: https://github.com/deptno/typescript-monorepo-cra-example
- Owner: deptno
- Created: 2018-08-14T18:06:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-15T06:23:50.000Z (about 6 years ago)
- Last Synced: 2024-07-16T07:39:45.656Z (2 months ago)
- Topics: cra, example, monorepo, monorepo-example, typescript, typescript-monorepo, typescript-monorepo-cra, typescript-monorepo-example, workspaces
- Language: TypeScript
- Homepage:
- Size: 136 KB
- Stars: 27
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# typescript-monorepo-cra-example
![](assets/component-a.png)
> 🙉 TypeScript Monorepo Sample
Required TypeScript@3 above## Create monorepo with create-react-app
### Prerequisition
`create-react-app`, `yarn`### Create monorepo
```bash
$ create-react-app typescript-monorepo/packages/react-app --react-scripts=react-scripts-ts
$ cd typescript-monorepo
$ rm -r packages/react-app/node_modules
```- create [package.json](package.json)
- create [packages/tsconfig.json](packages/tsconfig.json)
- create [packages/tsconfig.base.json](packages/tsconfig.base.json)### Create component
- create [packages/component-a](packages/component-a) - 3 files
### Edit react-app
- edit packages/react-app/src/App.tsx
- [packages/react-app/src/App.tsx](packages/react-app/src/App.tsx#L4)
- [packages/react-app/src/App.tsx](packages/react-app/src/App.tsx#L18)
- edit [packages/react-app/package.json](packages/react-app/package.json#L9)```bash
$ yarn
$ yarn build:packages
$ yarn start
```### Related
- [typescript-monorepo-next-example](https://github.com/deptno/typescript-monorepo-next-example) - Next.js version