Skip to content

Commit 63ec01e

Browse files
committed
chore(devextreme-react): replace gulp with nx plugin
1 parent 454c1a5 commit 63ec01e

File tree

116 files changed

+5552
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+5552
-177
lines changed

nx.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "nx/presets/npm.json",
33
"$schema": "./node_modules/nx/schemas/nx-schema.json",
44
"nxCloudAccessToken": "ZDFmMzkyZTYtZmU5MC00MDMyLWI3NDktYjhhYWUxZWM4YTg3fHJlYWQ=",
5+
"plugins": ["./packages/nx-infra-plugin/prod"],
56
"namedInputs": {
67
"metadataToolsCommonInputs": [
78
"{projectRoot}/**/*.ts",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"executors": {
3+
"generate-react-components": {
4+
"implementation": "./src/executors/generate-react-components/executor",
5+
"schema": "./src/executors/generate-react-components/schema.json",
6+
"description": "Generate React components from DevExtreme metadata"
7+
},
8+
"clean": {
9+
"implementation": "./src/executors/clean/executor",
10+
"schema": "./src/executors/clean/schema.json",
11+
"description": "Clean directories with support for simple or recursive mode"
12+
},
13+
"add-license-headers": {
14+
"implementation": "./src/executors/add-license-headers/executor",
15+
"schema": "./src/executors/add-license-headers/schema.json",
16+
"description": "Add license headers to compiled files"
17+
},
18+
"prepare-submodules": {
19+
"implementation": "./src/executors/prepare-submodules/executor",
20+
"schema": "./src/executors/prepare-submodules/schema.json",
21+
"description": "Prepare submodule entry points with package.json files"
22+
},
23+
"copy-files": {
24+
"implementation": "./src/executors/copy-files/executor",
25+
"schema": "./src/executors/copy-files/schema.json",
26+
"description": "Copy files to destination"
27+
},
28+
"build-typescript": {
29+
"implementation": "./src/executors/build-typescript/executor",
30+
"schema": "./src/executors/build-typescript/schema.json",
31+
"description": "Build TypeScript modules (CJS or ESM) with configurable output format"
32+
},
33+
"prepare-package-json": {
34+
"implementation": "./src/executors/prepare-package-json/executor",
35+
"schema": "./src/executors/prepare-package-json/schema.json",
36+
"description": "Create npm distribution package.json"
37+
},
38+
"pack-npm": {
39+
"implementation": "./src/executors/pack-npm/executor",
40+
"schema": "./src/executors/pack-npm/schema.json",
41+
"description": "Run pnpm pack for npm distribution"
42+
}
43+
}
44+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"targetDirectory": {
5+
"type": "string",
6+
"description": "Directory containing files to add headers to",
7+
"default": "./npm"
8+
},
9+
"packageJsonPath": {
10+
"type": "string",
11+
"description": "Path to package.json for version info",
12+
"default": "./package.json"
13+
}
14+
},
15+
"required": []
16+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "http://json-schema.org/schema",
3+
"type": "object",
4+
"title": "Build TypeScript Executor",
5+
"description": "Compile TypeScript code to CommonJS or ESM modules",
6+
"properties": {
7+
"module": {
8+
"type": "string",
9+
"description": "Target module format. 'esm' generates ES modules with import/export statements, 'cjs' generates CommonJS with require/module.exports. This affects output file structure, TypeScript compiler module settings, and determines the default tsconfig and output directory.",
10+
"enum": ["cjs", "esm"],
11+
"default": "esm"
12+
},
13+
"srcPattern": {
14+
"type": "string",
15+
"description": "Glob pattern for source files to include in compilation. Supports standard glob syntax with wildcards. Default pattern includes all .ts and .tsx files in src directory recursively.",
16+
"default": "./src/**/*.{ts,tsx}"
17+
},
18+
"excludePattern": {
19+
"type": "string",
20+
"description": "Glob pattern for files to exclude from compilation (e.g., test files, stories). Files matching this pattern will be ignored even if they match srcPattern. Commonly used to exclude __tests__, __mocks__, or *.spec.ts files."
21+
},
22+
"tsconfig": {
23+
"type": "string",
24+
"description": "Path to TypeScript configuration file relative to project root. If not specified, defaults to './tsconfig.json' for CJS builds or './tsconfig.esm.json' for ESM builds. The tsconfig should contain appropriate module and target settings for the desired output format."
25+
},
26+
"outDir": {
27+
"type": "string",
28+
"description": "Output directory path relative to project root where compiled JavaScript and declaration files will be written. If not specified, defaults to './npm/cjs' for CJS builds or './npm/esm' for ESM builds. Directory will be created if it doesn't exist."
29+
}
30+
},
31+
"required": [],
32+
"additionalProperties": false
33+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"targetDirectory": {
5+
"type": "string",
6+
"description": "Directory to clean",
7+
"default": "./src"
8+
},
9+
"excludePatterns": {
10+
"type": "array",
11+
"description": "Patterns to exclude (only used with recursive mode)",
12+
"items": {
13+
"type": "string"
14+
},
15+
"default": []
16+
},
17+
"mode": {
18+
"type": "string",
19+
"enum": ["simple", "recursive", "shallow"],
20+
"description": "Cleaning mode: 'simple' removes entire directory, 'recursive' removes contents recursively with exclusions, 'shallow' removes only first-level items with exclusions",
21+
"default": "simple"
22+
}
23+
},
24+
"required": []
25+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"files": {
5+
"type": "array",
6+
"description": "Files to copy (array of {from, to})",
7+
"items": {
8+
"type": "object",
9+
"properties": {
10+
"from": {
11+
"type": "string"
12+
},
13+
"to": {
14+
"type": "string"
15+
}
16+
},
17+
"required": ["from", "to"]
18+
}
19+
}
20+
},
21+
"required": ["files"]
22+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
export interface GenerateReactComponentsExecutorSchema {
2+
/**
3+
* Path to the metadata JSON file containing widget definitions.
4+
* If not provided, will use devextreme-metadata/integration-data.json
5+
*/
6+
metadataPath?: string;
7+
8+
/**
9+
* Output directory for generated components.
10+
* @default "./src"
11+
*/
12+
componentsDir?: string;
13+
14+
/**
15+
* Path to the index file that will export all generated components.
16+
* @default "./src/index.ts"
17+
*/
18+
indexFileName?: string;
19+
20+
/**
21+
* Path to the base component template.
22+
* @default "./core/component"
23+
*/
24+
baseComponent?: string;
25+
26+
/**
27+
* Path to the extension component template.
28+
* @default "./core/extension-component"
29+
*/
30+
extensionComponent?: string;
31+
32+
/**
33+
* Path to the config component template (nested options).
34+
* @default "./core/nested-option"
35+
*/
36+
configComponent?: string;
37+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"metadataPath": {
5+
"type": "string",
6+
"description": "Path to metadata JSON file"
7+
},
8+
"componentsDir": {
9+
"type": "string",
10+
"description": "Output directory for generated components",
11+
"default": "./src"
12+
},
13+
"indexFileName": {
14+
"type": "string",
15+
"description": "Index file name",
16+
"default": "./src/index.ts"
17+
},
18+
"baseComponent": {
19+
"type": "string",
20+
"description": "Base component path",
21+
"default": "./core/component"
22+
},
23+
"extensionComponent": {
24+
"type": "string",
25+
"description": "Extension component path",
26+
"default": "./core/extension-component"
27+
},
28+
"configComponent": {
29+
"type": "string",
30+
"description": "Config component path",
31+
"default": "./core/nested-option"
32+
}
33+
},
34+
"required": ["metadataPath"]
35+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"workingDirectory": {
5+
"type": "string",
6+
"description": "Working directory for pnpm pack",
7+
"default": "./"
8+
}
9+
},
10+
"required": []
11+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"type": "object",
3+
"properties": {
4+
"sourcePackageJson": {
5+
"type": "string",
6+
"description": "Path to source package.json",
7+
"default": "./package.json"
8+
},
9+
"distDirectory": {
10+
"type": "string",
11+
"description": "Distribution directory",
12+
"default": "./npm"
13+
}
14+
},
15+
"required": []
16+
}

0 commit comments

Comments
 (0)