Skip to content

Commit

Permalink
docs: 📚️ README .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuyudong committed May 10, 2022
1 parent fa17d28 commit 1a2594c
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 16 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/node_modules
*.log
.DS_Store
.env
/.cache
/logs
/public/build
/build
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ dist
# TernJS port file
.tern-port

package-lock.json
pnpm-lock.yaml
pnpm-lock.yml
yarn.lock
build
postgres-data
Expand Down
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Remix 项目模板,使用 NestJS 作为服务端
`npx create-remix --template turing-fe/remix-nestjs remix-nestjs-project`

## 功能
-[React18]()
-[MDX]()
-[Remark]()
-[Rehype]()
-[PostgreSQL]()
-[Cypress]()
- [React18]()
- [MDX]()
- [Remark]()
- [Rehype]()
- [PostgreSQL]()
- [Cypress]()
- [ ] [Docker]()
- [ ] [NestJS]()
- [ ] [contentlayer](https://github.com/contentlayerdev/contentlayer)
Expand All @@ -21,8 +21,9 @@ Remix 项目模板,使用 NestJS 作为服务端
2. `copy .env.example .env`
3. `npm run docker`
4. `npx prisma generate`
5. `npm run build`
6. `npm run dev`
5. `npx prisma db push`
6. `npm run build`
7. `npm run dev`

## 测试
1. `npm run build`
Expand All @@ -32,7 +33,8 @@ Remix 项目模板,使用 NestJS 作为服务端
1. `npm run build`
2. `npm run start` or `npm run start:pm2` or `npm run start:mocks`

## 目录结构
<details>
<summary>目录结构</summary>

```
remix-nestjs
Expand Down Expand Up @@ -107,9 +109,10 @@ remix-nestjs
├─ verify-commit-msg.js
└─ vitest.config.ts
```
</details>

## 升级为 React18
`app/entry.client.tsx`
> app/entry.client.tsx
```diff
- import { hydrate } from 'react-dom'
Expand All @@ -121,4 +124,14 @@ remix-nestjs


## 相关链接
- [remix](https://remix.run/docs/en/v1)
- [blues-stack](https://github.com/remix-run/blues-stack)
- [TaiwindCSS](https://tailwindcss.com/)
- [NestJS](https://nestjs.com/)
- [Prisma](https://www.prisma.io/)
- [PostgreSQL](https://www.postgresql.org/)
- [cypress](https://docs.cypress.io/)
- [Fly.io](https://fly.io/)
- [Vitest](https://vitest.dev/)
- [Testing Library](https://testing-library.com/)
- [Mock Service Worker](https://mswjs.io/)
11 changes: 11 additions & 0 deletions remix.init/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules

/build
/public/build
.env

/cypress/screenshots
/cypress/videos
/postgres-data

/app/styles/tailwind.css
20 changes: 14 additions & 6 deletions remix.init/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ async function main({ rootDirectory }) {
fs.readFile(FLY_TOML_PATH, 'utf-8'),
fs.readFile(README_PATH, 'utf-8'),
fs.readFile(EXAMPLE_ENV_PATH, 'utf-8'),
fs.readFile(PACKAGE_JSON_PATH, 'utf-8'),
fs.rm(path.join(rootDirectory, '.github/ISSUE_TEMPLATE'), {
recursive: true
}),
fs.rm(path.join(rootDirectory, '.github/PULL_REQUEST_TEMPLATE.md'))
fs.readFile(PACKAGE_JSON_PATH, 'utf-8')
// fs.rm(path.join(rootDirectory, '.github/ISSUE_TEMPLATE'), {
// recursive: true
// }),
// fs.rm(path.join(rootDirectory, '.github/PULL_REQUEST_TEMPLATE.md'))
])

const newEnv = env.replace(
Expand All @@ -65,7 +65,15 @@ async function main({ rootDirectory }) {
fs.writeFile(FLY_TOML_PATH, toml.stringify(prodToml)),
fs.writeFile(README_PATH, newReadme),
fs.writeFile(ENV_PATH, newEnv),
fs.writeFile(PACKAGE_JSON_PATH, newPackageJson)
fs.writeFile(PACKAGE_JSON_PATH, newPackageJson),
fs.copyFile(
path.join(rootDirectory, 'remix.init', 'gitignore'),
path.join(rootDirectory, '.gitignore')
),
fs.rm(path.join(rootDirectory, '.github/ISSUE_TEMPLATE'), {
recursive: true
}),
fs.rm(path.join(rootDirectory, '.github/PULL_REQUEST_TEMPLATE.md'))
])

console.log(
Expand Down

0 comments on commit 1a2594c

Please sign in to comment.