-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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: add nx #11461
chore: add nx #11461
Changes from all commits
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,86 @@ | ||
{ | ||
"tasksRunnerOptions": { | ||
"default": { | ||
"runner": "@nrwl/nx-cloud", | ||
"options": { | ||
"cacheableOperations": [ | ||
"build", | ||
"lint", | ||
"typecheck", | ||
"test-unit", | ||
"test-build", | ||
"test-docs", | ||
"docs-build" | ||
], | ||
"accessToken": "NjYwZGFlNWYtZGYyNS00MTIzLTkzYTEtYzAxZTZiYzUwYTVifHJlYWQtd3JpdGU=" | ||
} | ||
} | ||
}, | ||
"namedInputs": { | ||
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. See description for how |
||
"default": [ | ||
"{workspaceRoot}/packages/**/*", | ||
{ | ||
"runtime": "node -e \"console.log(process.platform)\"" | ||
} | ||
], | ||
"production": [ | ||
"default", | ||
"!{workspaceRoot}/packages/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", | ||
"!{workspaceRoot}/vitest.config.e2e.ts", | ||
"!{workspaceRoot}/vitest.config.ts", | ||
"!{workspaceRoot}/.eslintignore", | ||
"!{workspaceRoot}/.eslintrc.cjs", | ||
"!{projectRoot}/tsconfig.check.json" | ||
], | ||
"playground": [ | ||
"default", | ||
"{workspaceRoot}/playground/**/*", | ||
{ | ||
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.
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. would it also include extra cli arguments? eg 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. yeah, extra args should be included already |
||
"env": "VITE_TEST_BUILD" | ||
}, | ||
{ | ||
"env": "VITE_TEST_WITHOUT_PLUGIN_COMMONJS" | ||
} | ||
] | ||
}, | ||
"targetDefaults": { | ||
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 section configures tasks and their dependencies + inputs that affect their computation. |
||
"typecheck": { | ||
"dependsOn": [ | ||
"default", | ||
"{projectRoot}/tsconfig.check.json", | ||
"{projectRoot}/**/*.[jt]sx?" | ||
] | ||
}, | ||
"build": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["production", "!{projectRoot}/LICENSE.md"], | ||
"outputs": ["{projectRoot}/dist"] | ||
}, | ||
"test-unit": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["default", "^production", "{workspaceRoot}/vitest.config.ts"] | ||
}, | ||
"test-build": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["playground", "{workspaceRoot}/vitest.config.e2e.ts"] | ||
}, | ||
"test-serve": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["playground", "{workspaceRoot}/vitest.config.e2e.ts"] | ||
}, | ||
"docs": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["{workspaceRoot}/docs/**/*"] | ||
}, | ||
"docs-build": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["{workspaceRoot}/docs/**/*"], | ||
"outputs": ["{workspaceRoot}/docs/.vitepress/dist"] | ||
}, | ||
"docs-serve": { | ||
"dependsOn": ["^build"], | ||
"inputs": ["{workspaceRoot}/docs/**/*"] | ||
} | ||
}, | ||
"defaultBase": "main" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,17 +19,17 @@ | |
"lint": "eslint --cache .", | ||
"typecheck": "tsc -p scripts --noEmit && pnpm -r --parallel run typecheck", | ||
"test": "run-s test-unit test-serve test-build", | ||
"test-serve": "vitest run -c vitest.config.e2e.ts", | ||
"test-build": "VITE_TEST_BUILD=1 vitest run -c vitest.config.e2e.ts", | ||
"test-serve": "nx exec -- vitest run -c vitest.config.e2e.ts", | ||
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.
For example, users continue to use 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. does the nx cli prefix/modify log output of the original command? 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. the |
||
"test-build": "VITE_TEST_BUILD=1 nx exec -- vitest run -c vitest.config.e2e.ts", | ||
"test-build-without-plugin-commonjs": "VITE_TEST_WITHOUT_PLUGIN_COMMONJS=1 pnpm test-build", | ||
"test-unit": "vitest run", | ||
"test-docs": "pnpm run docs-build", | ||
"test-unit": "nx exec -- vitest run", | ||
"test-docs": "nx exec -- pnpm run docs-build", | ||
"debug-serve": "VITE_DEBUG_SERVE=1 vitest run -c vitest.config.e2e.ts", | ||
"debug-build": "VITE_TEST_BUILD=1 VITE_PRESERVE_BUILD_ARTIFACTS=1 vitest run -c vitest.config.e2e.ts", | ||
"docs": "vitepress dev docs", | ||
"docs-build": "vitepress build docs", | ||
"docs-serve": "vitepress serve docs", | ||
"build": "pnpm -r --filter='./packages/*' run build", | ||
"docs": "nx exec -- vitepress dev docs", | ||
"docs-build": "nx exec -- vitepress build docs", | ||
"docs-serve": "nx exec -- vitepress serve docs", | ||
"build": "nx run-many --target=build --projects=vite,@vitejs/plugin-legacy,create-vite", | ||
"dev": "pnpm -r --parallel --filter='./packages/*' run dev", | ||
"release": "tsx scripts/release.ts", | ||
"ci-publish": "tsx scripts/publishCI.ts", | ||
|
@@ -90,7 +90,9 @@ | |
"vite": "workspace:*", | ||
"vitepress": "^1.0.0-alpha.31", | ||
"vitest": "^0.25.7", | ||
"vue": "^3.2.45" | ||
"vue": "^3.2.45", | ||
"nx": "15.3.3", | ||
"@nrwl/nx-cloud": "latest" | ||
}, | ||
"simple-git-hooks": { | ||
"pre-commit": "pnpm exec lint-staged --concurrent false" | ||
|
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.
as mentioned in my general comment, this key must not provide write access to the cache or it would be far too dangerous to use.
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.
Correct. The accessToken that is committed to an open source repo should always be a read only token. I'm sure @jaysoo set this token to read only. You can use a read-write token in a
.env
file that is not committed to the repo on trusted dev machines or only use the read-write token in the environment variables in CI.