Skip to content

Commit 3a5f963

Browse files
committed
Initial commit
0 parents  commit 3a5f963

23 files changed

+15504
-0
lines changed

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
dist
5+
tmp
6+
/out-tsc
7+
8+
# dependencies
9+
node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db
40+
41+
.nx/cache
42+
.nx/workspace-data
43+
44+
**/vite.config.{js,ts,mjs,mts,cjs,cts}.timestamp*

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Add files here to ignore them from prettier formatting
2+
/dist
3+
/coverage
4+
/.nx/cache
5+
/.nx/workspace-data

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode"]
3+
}

README.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# YjsDemo
2+
3+
<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>
4+
5+
✨ Your new, shiny [Nx workspace](https://nx.dev) is ready ✨.
6+
7+
[Learn more about this workspace setup and its capabilities](https://nx.dev/getting-started/tutorials/react-standalone-tutorial?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects) or run `npx nx graph` to visually explore what was created. Now, let's get you up to speed!
8+
9+
## Run tasks
10+
11+
To run the dev server for your app, use:
12+
13+
```sh
14+
npx nx serve yjs-demo
15+
```
16+
17+
To create a production bundle:
18+
19+
```sh
20+
npx nx build yjs-demo
21+
```
22+
23+
To see all available targets to run for a project, run:
24+
25+
```sh
26+
npx nx show project yjs-demo
27+
```
28+
29+
These targets are either [inferred automatically](https://nx.dev/concepts/inferred-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) or defined in the `project.json` or `package.json` files.
30+
31+
[More about running tasks in the docs &raquo;](https://nx.dev/features/run-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
32+
33+
## Add new projects
34+
35+
While you could add new projects to your workspace manually, you might want to leverage [Nx plugins](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) and their [code generation](https://nx.dev/features/generate-code?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) feature.
36+
37+
Use the plugin's generator to create new projects.
38+
39+
To generate a new application, use:
40+
41+
```sh
42+
npx nx g @nx/react:app demo
43+
```
44+
45+
To generate a new library, use:
46+
47+
```sh
48+
npx nx g @nx/react:lib mylib
49+
```
50+
51+
You can use `npx nx list` to get a list of installed plugins. Then, run `npx nx list <plugin-name>` to learn about more specific capabilities of a particular plugin. Alternatively, [install Nx Console](https://nx.dev/getting-started/editor-setup?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) to browse plugins and generators in your IDE.
52+
53+
[Learn more about Nx plugins &raquo;](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) | [Browse the plugin registry &raquo;](https://nx.dev/plugin-registry?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
54+
55+
## Set up CI!
56+
57+
### Step 1
58+
59+
To connect to Nx Cloud, run the following command:
60+
61+
```sh
62+
npx nx connect
63+
```
64+
65+
Connecting to Nx Cloud ensures a [fast and scalable CI](https://nx.dev/ci/intro/why-nx-cloud?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects) pipeline. It includes features such as:
66+
67+
- [Remote caching](https://nx.dev/ci/features/remote-cache?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
68+
- [Task distribution across multiple machines](https://nx.dev/ci/features/distribute-task-execution?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
69+
- [Automated e2e test splitting](https://nx.dev/ci/features/split-e2e-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
70+
- [Task flakiness detection and rerunning](https://nx.dev/ci/features/flaky-tasks?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
71+
72+
### Step 2
73+
74+
Use the following command to configure a CI workflow for your workspace:
75+
76+
```sh
77+
npx nx g ci-workflow
78+
```
79+
80+
[Learn more about Nx on CI](https://nx.dev/ci/intro/ci-with-nx#ready-get-started-with-your-provider?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
81+
82+
## Install Nx Console
83+
84+
Nx Console is an editor extension that enriches your developer experience. It lets you run tasks, generate code, and improves code autocompletion in your IDE. It is available for VSCode and IntelliJ.
85+
86+
[Install Nx Console &raquo;](https://nx.dev/getting-started/editor-setup?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
87+
88+
## Useful links
89+
90+
Learn more:
91+
92+
- [Learn more about this workspace setup](https://nx.dev/getting-started/tutorials/react-standalone-tutorial?utm_source=nx_project&amp;utm_medium=readme&amp;utm_campaign=nx_projects)
93+
- [Learn about Nx on CI](https://nx.dev/ci/intro/ci-with-nx?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
94+
- [Releasing Packages with Nx release](https://nx.dev/features/manage-releases?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
95+
- [What are Nx plugins?](https://nx.dev/concepts/nx-plugins?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)
96+
97+
And join the Nx community:
98+
- [Discord](https://go.nx.dev/community)
99+
- [Follow us on X](https://twitter.com/nxdevtools) or [LinkedIn](https://www.linkedin.com/company/nrwl)
100+
- [Our Youtube channel](https://www.youtube.com/@nxdevtools)
101+
- [Our blog](https://nx.dev/blog?utm_source=nx_project&utm_medium=readme&utm_campaign=nx_projects)

eslint.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const nx = require('@nx/eslint-plugin');
2+
3+
module.exports = [
4+
...nx.configs['flat/base'],
5+
...nx.configs['flat/typescript'],
6+
...nx.configs['flat/javascript'],
7+
{
8+
ignores: ['**/dist'],
9+
},
10+
{
11+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
12+
// Override or add rules here
13+
rules: {},
14+
},
15+
...nx.configs['flat/react'],
16+
{
17+
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
18+
// Override or add rules here
19+
rules: {},
20+
},
21+
];

index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>YjsDemo</title>
6+
<base href="/" />
7+
8+
<meta name="viewport" content="width=device-width, initial-scale=1" />
9+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
10+
<link rel="stylesheet" href="/src/styles.scss" />
11+
</head>
12+
<body>
13+
<div id="root"></div>
14+
<script type="module" src="/src/main.tsx"></script>
15+
</body>
16+
</html>

nx.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3+
"namedInputs": {
4+
"default": ["{projectRoot}/**/*", "sharedGlobals"],
5+
"production": [
6+
"default",
7+
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
8+
"!{projectRoot}/tsconfig.spec.json",
9+
"!{projectRoot}/.eslintrc.json",
10+
"!{projectRoot}/eslint.config.js"
11+
],
12+
"sharedGlobals": []
13+
},
14+
"plugins": [
15+
{
16+
"plugin": "@nx/vite/plugin",
17+
"options": {
18+
"buildTargetName": "build",
19+
"testTargetName": "test",
20+
"serveTargetName": "serve",
21+
"previewTargetName": "preview",
22+
"serveStaticTargetName": "serve-static",
23+
"typecheckTargetName": "typecheck"
24+
}
25+
},
26+
{
27+
"plugin": "@nx/eslint/plugin",
28+
"options": {
29+
"targetName": "lint"
30+
}
31+
}
32+
],
33+
"defaultProject": "yjs-demo",
34+
"generators": {
35+
"@nx/react": {
36+
"application": {
37+
"babel": true,
38+
"style": "scss",
39+
"linter": "eslint",
40+
"bundler": "vite"
41+
},
42+
"component": {
43+
"style": "scss"
44+
},
45+
"library": {
46+
"style": "scss",
47+
"linter": "eslint"
48+
}
49+
}
50+
}
51+
}

0 commit comments

Comments
 (0)