feat(rsbuild): add intial package (#29147)
## Current Behavior We do not currently have a package or plugin to officially support Rsbuild (http://rsbuild.dev) ## Expected Behavior We should have a package to manage Rsbuild support
This commit is contained in:
parent
cc1441170a
commit
50d83e2178
@ -97,6 +97,7 @@ rust-toolchain @nrwl/nx-native-reviewers
|
||||
/e2e/webpack/** @nrwl/nx-js-reviewers
|
||||
/packages/rspack/** @nrwl/nx-js-reviewers
|
||||
/e2e/rspack/** @nrwl/nx-js-reviewers
|
||||
/packages/rsbuild/** @nrwl/nx-js-reviewers
|
||||
/packages/esbuild/** @nrwl/nx-js-reviewers
|
||||
/e2e/esbuild/** @nrwl/nx-js-reviewers
|
||||
/packages/rollup/** @nrwl/nx-js-reviewers
|
||||
|
||||
@ -9885,6 +9885,14 @@
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"id": "rsbuild",
|
||||
"path": "/nx-api/rsbuild",
|
||||
"name": "rsbuild",
|
||||
"children": [],
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"id": "rspack",
|
||||
"path": "/nx-api/rspack",
|
||||
|
||||
@ -2891,6 +2891,18 @@
|
||||
},
|
||||
"path": "/nx-api/rollup"
|
||||
},
|
||||
"rsbuild": {
|
||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||
"name": "rsbuild",
|
||||
"packageName": "@nx/rsbuild",
|
||||
"description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
|
||||
"documents": {},
|
||||
"root": "/packages/rsbuild",
|
||||
"source": "/packages/rsbuild/src",
|
||||
"executors": {},
|
||||
"generators": {},
|
||||
"path": "/nx-api/rsbuild"
|
||||
},
|
||||
"rspack": {
|
||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||
"name": "rspack",
|
||||
|
||||
@ -2865,6 +2865,17 @@
|
||||
"root": "/packages/rollup",
|
||||
"source": "/packages/rollup/src"
|
||||
},
|
||||
{
|
||||
"description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
|
||||
"documents": [],
|
||||
"executors": [],
|
||||
"generators": [],
|
||||
"githubRoot": "https://github.com/nrwl/nx/blob/master",
|
||||
"name": "rsbuild",
|
||||
"packageName": "@nx/rsbuild",
|
||||
"root": "/packages/rsbuild",
|
||||
"source": "/packages/rsbuild/src"
|
||||
},
|
||||
{
|
||||
"description": "The Nx Plugin for Rspack contains executors and generators that support building applications using Rspack.",
|
||||
"documents": [
|
||||
|
||||
@ -685,6 +685,7 @@
|
||||
- [init](/nx-api/rollup/generators/init)
|
||||
- [configuration](/nx-api/rollup/generators/configuration)
|
||||
- [convert-to-inferred](/nx-api/rollup/generators/convert-to-inferred)
|
||||
- [rsbuild](/nx-api/rsbuild)
|
||||
- [rspack](/nx-api/rspack)
|
||||
- [documents](/nx-api/rspack/documents)
|
||||
- [Overview](/nx-api/rspack/documents/overview)
|
||||
|
||||
44
packages/rsbuild/.eslintrc.json
Normal file
44
packages/rsbuild/.eslintrc.json
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
},
|
||||
{
|
||||
"files": ["./package.json", "./generators.json", "./executors.json"],
|
||||
"parser": "jsonc-eslint-parser",
|
||||
"rules": {
|
||||
"@nx/nx-plugin-checks": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["./package.json"],
|
||||
"parser": "jsonc-eslint-parser",
|
||||
"rules": {
|
||||
"@nx/dependency-checks": [
|
||||
"error",
|
||||
{
|
||||
"buildTargets": ["build-base"],
|
||||
"ignoredDependencies": [
|
||||
"nx",
|
||||
"eslint",
|
||||
"typescript",
|
||||
"@nx/cypress",
|
||||
"@nx/playwright"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
18
packages/rsbuild/README.md
Normal file
18
packages/rsbuild/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
<p style="text-align: center;">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
|
||||
<img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
|
||||
</picture>
|
||||
</p>
|
||||
|
||||
{{links}}
|
||||
|
||||
<hr>
|
||||
|
||||
# Nx: Smart Monorepos · Fast CI
|
||||
|
||||
Nx is a build system, optimized for monorepos, with plugins for popular frameworks and tools and advanced CI capabilities including caching and distribution.
|
||||
|
||||
This package is a [Rsbuild plugin for Nx](https://nx.dev/nx-api/rsbuild).
|
||||
|
||||
{{content}}
|
||||
4
packages/rsbuild/executors.json
Normal file
4
packages/rsbuild/executors.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"executors": {}
|
||||
}
|
||||
0
packages/rsbuild/index.ts
Normal file
0
packages/rsbuild/index.ts
Normal file
16
packages/rsbuild/jest.config.ts
Normal file
16
packages/rsbuild/jest.config.ts
Normal file
@ -0,0 +1,16 @@
|
||||
/* eslint-disable */
|
||||
export default {
|
||||
displayName: 'rsbuild',
|
||||
preset: '../../jest.preset.js',
|
||||
globals: {},
|
||||
transform: {
|
||||
'^.+\\.[tj]s$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
},
|
||||
],
|
||||
},
|
||||
moduleFileExtensions: ['ts', 'js', 'html'],
|
||||
coverageDirectory: '../../coverage/packages/rsbuild',
|
||||
};
|
||||
1
packages/rsbuild/migrations.json
Normal file
1
packages/rsbuild/migrations.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
||||
37
packages/rsbuild/package.json
Normal file
37
packages/rsbuild/package.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "@nx/rsbuild",
|
||||
"description": "The Nx Plugin for Rsbuild contains an Nx plugin, executors and utilities that support building applications using Rsbuild.",
|
||||
"version": "0.0.1",
|
||||
"type": "commonjs",
|
||||
"publishConfig": {
|
||||
"access": "private"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nrwl/nx.git",
|
||||
"directory": "packages/rsbuild"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/nrwl/nx/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"Monorepo",
|
||||
"Rspack",
|
||||
"Webpack",
|
||||
"Bundling",
|
||||
"Module Federation",
|
||||
"Rsbuild"
|
||||
],
|
||||
"author": "Colum Ferry",
|
||||
"license": "MIT",
|
||||
"homepage": "https://nx.dev",
|
||||
"main": "index.js",
|
||||
"executors": "./executors.json",
|
||||
"dependencies": {
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"nx-migrations": {
|
||||
"migrations": "./migrations.json"
|
||||
}
|
||||
}
|
||||
55
packages/rsbuild/project.json
Normal file
55
packages/rsbuild/project.json
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "rsbuild",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "packages/rsbuild",
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build-base": {
|
||||
"executor": "@nx/js:tsc",
|
||||
"options": {
|
||||
"outputPath": "build/packages/rsbuild",
|
||||
"tsConfig": "packages/rsbuild/tsconfig.lib.json",
|
||||
"main": "packages/rsbuild/index.ts",
|
||||
"assets": [
|
||||
{
|
||||
"input": "packages/rsbuild",
|
||||
"glob": "**/files/**",
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"input": "packages/rsbuild",
|
||||
"glob": "**/files/**/.gitkeep",
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"input": "packages/rsbuild",
|
||||
"glob": "**/*.json",
|
||||
"ignore": ["**/tsconfig*.json", "project.json", ".eslintrc.json"],
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"input": "packages/rsbuild",
|
||||
"glob": "**/*.js",
|
||||
"ignore": ["**/jest.config.js"],
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"input": "packages/rsbuild",
|
||||
"glob": "**/*.d.ts",
|
||||
"output": "/"
|
||||
},
|
||||
{
|
||||
"input": "",
|
||||
"glob": "LICENSE",
|
||||
"output": "/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputs": ["{options.outputPath}"]
|
||||
},
|
||||
"build": {
|
||||
"command": "node ./scripts/copy-readme.js rsbuild",
|
||||
"outputs": ["{workspaceRoot}/build/packages/rsbuild"]
|
||||
}
|
||||
}
|
||||
}
|
||||
16
packages/rsbuild/tsconfig.json
Normal file
16
packages/rsbuild/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"module": "commonjs"
|
||||
},
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.spec.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
10
packages/rsbuild/tsconfig.lib.json
Normal file
10
packages/rsbuild/tsconfig.lib.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"declaration": true,
|
||||
"types": ["node"]
|
||||
},
|
||||
"include": ["**/*.ts"],
|
||||
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"]
|
||||
}
|
||||
9
packages/rsbuild/tsconfig.spec.json
Normal file
9
packages/rsbuild/tsconfig.spec.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"module": "commonjs",
|
||||
"types": ["jest", "node"]
|
||||
},
|
||||
"include": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts", "**/*.d.ts"]
|
||||
}
|
||||
@ -21,6 +21,7 @@ const scopes = [
|
||||
{ value: 'react-native', name: 'react-native: anything React Native specific' },
|
||||
{ value: 'remix', name: 'remix: anything Remix specific' },
|
||||
{ value: 'rspack', name: 'rspack: anything Rspack specific' },
|
||||
{ value: 'rsbuild', name: 'rsbuild: anything Rsbuild specific' },
|
||||
{ value: 'expo', name: 'expo: anything Expo specific' },
|
||||
{ value: 'release', name: 'release: anything related to nx release' },
|
||||
{ value: 'repo', name: 'repo: anything related to managing the repo itself' },
|
||||
|
||||
@ -132,6 +132,8 @@
|
||||
"@nx/remix/*": ["packages/remix/*"],
|
||||
"@nx/rollup": ["packages/rollup"],
|
||||
"@nx/rollup/*": ["packages/rollup/*"],
|
||||
"@nx/rsbuild": ["packages/rsbuild/src"],
|
||||
"@nx/rsbuild/*": ["packages/rsbuild/src/*"],
|
||||
"@nx/rspack": ["packages/rspack/src"],
|
||||
"@nx/rspack/*": ["packages/rspack/src/*"],
|
||||
"@nx/storybook": ["packages/storybook"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user