Skip to content

Commit

Permalink
chore(zhi-root): basic structure for nx 16
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed May 4, 2023
1 parent 7673880 commit 33b0843
Show file tree
Hide file tree
Showing 65 changed files with 8,000 additions and 8,493 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
10 changes: 0 additions & 10 deletions .eslintrc.cjs

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/ci.yml

This file was deleted.

67 changes: 32 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,39 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
dist
tmp
/out-tsc

# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# next.js
.next/
out/
build
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# turbo
.turbo

# vercel
.vercel

# ide
.idea

# build
dist
Thumbs.db
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

14 changes: 3 additions & 11 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# platform

# Ignore artifacts:
dist
node_modules

# Ignore all dts files:
*.d.ts

# lib
/pnpm-lock.yaml
# Add files here to ignore them from prettier formatting
/dist
/coverage
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": false,
"printWidth": 120
}
40 changes: 0 additions & 40 deletions .prettierrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode"]
}
82 changes: 9 additions & 73 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,17 @@
# Turborepo starter
# Zhi

This is an official starter Turborepo.
<a alt="Nx logo" href="https://nx.dev" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="45"></a>

## Using this example
**This workspace has been generated by [Nx, a Smart, fast and extensible build system.](https://nx.dev)**

Run the following command:
## Understand this workspace

```sh
npx create-turbo@latest
```
Run `nx graph` to see a diagram of the dependencies of the projects.

## What's inside?
## Remote caching

This Turborepo includes the following packages/apps:
Run `npx nx connect-to-nx-cloud` to enable [remote caching](https://nx.app) and make CI faster.

### Apps and Packages
## Further help

- `docs`: a [Next.js](https://nextjs.org/) app
- `web`: another [Next.js](https://nextjs.org/) app
- `ui`: a stub React component library shared by both `web` and `docs` applications
- `eslint-config-custom`: `eslint` configurations (includes `eslint-config-next` and `eslint-config-prettier`)
- `tsconfig`: `tsconfig.json`s used throughout the monorepo

Each package/app is 100% [TypeScript](https://www.typescriptlang.org/).

### Utilities

This Turborepo has some additional tools already setup for you:

- [TypeScript](https://www.typescriptlang.org/) for static type checking
- [ESLint](https://eslint.org/) for code linting
- [Prettier](https://prettier.io) for code formatting

### Build

To build all apps and packages, run the following command:

```
cd my-turborepo
pnpm build
```

### Develop

To develop all apps and packages, run the following command:

```
cd my-turborepo
pnpm dev
```

### Remote Caching

Turborepo can use a technique known as [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching) to share cache artifacts across machines, enabling you to share build caches with your team and CI/CD pipelines.

By default, Turborepo will cache locally. To enable Remote Caching you will need an account with Vercel. If you don't have an account you can [create one](https://vercel.com/signup), then enter the following commands:

```
cd my-turborepo
npx turbo login
```

This will authenticate the Turborepo CLI with your [Vercel account](https://vercel.com/docs/concepts/personal-accounts/overview).

Next, you can link your Turborepo to your Remote Cache by running the following command from the root of your Turborepo:

```
npx turbo link
```

## Useful Links

Learn more about the power of Turborepo:

- [Tasks](https://turbo.build/repo/docs/core-concepts/monorepos/running-tasks)
- [Caching](https://turbo.build/repo/docs/core-concepts/caching)
- [Remote Caching](https://turbo.build/repo/docs/core-concepts/remote-caching)
- [Filtering](https://turbo.build/repo/docs/core-concepts/monorepos/filtering)
- [Configuration Options](https://turbo.build/repo/docs/reference/configuration)
- [CLI Usage](https://turbo.build/repo/docs/reference/command-line-reference)
Visit the [Nx Documentation](https://nx.dev) to learn more.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ to:
- It can handle both the theme and the preview. Installing the zhi theme is equivalent to installing an additional
plugin system and an online blog.
- SPA blog homepage( `enabled and bundled by default` ): http://127.0.0.1:6806/appearance/themes/zhi/web/blog/ <sup>simple</sup>
- SSR blog homepage( `⚠️ need to enabled manually` ): http://127.0.0.1:6806/appearance/themes/zhi/server/blog/ <sup>seo friendly</sup>
- SSR blog homepage( `⚠️ need to be enabled manually` ): http://127.0.0.1:6806/appearance/themes/zhi/server/blog/ <sup>seo friendly</sup>

> Note: 🌹 The plugin system is provided by enthusiastic community developers. Please understand the relevant mechanisms in
> detail before using.
## Technical Roadmap

[tech](tech.md)
[development](DEVELOPMENT.md)

## Acknowledgments

Expand Down
Empty file added apps/.gitkeep
Empty file.
4 changes: 0 additions & 4 deletions apps/docs/.eslintrc.js

This file was deleted.

34 changes: 0 additions & 34 deletions apps/docs/.gitignore

This file was deleted.

30 changes: 0 additions & 30 deletions apps/docs/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions apps/docs/next-env.d.ts

This file was deleted.

Loading

0 comments on commit 33b0843

Please sign in to comment.