Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
pomahtri committed Apr 16, 2024
1 parent 0c31954 commit a8e8bd2
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 34 deletions.
15 changes: 0 additions & 15 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@
],
"cache": true
},
"angular:copy-metadata": {
"dependsOn": [
"tools:discover-metadata"
]
},
"react:copy-metadata": {
"dependsOn": [
"tools:discover-metadata"
]
},
"vue:copy-metadata": {
"dependsOn": [
"tools:discover-metadata"
]
},
"lint": {
"cache": true
},
Expand Down
12 changes: 0 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,7 @@
"devextreme:inject-descriptions-to-bundle": "dx-tools inject-descriptions --target-path ./packages/devextreme/ts/dx.all.d.ts --artifacts ./artifacts/internal-tools",
"devextreme:inject-descriptions-to-modules": "dx-tools inject-descriptions --collapse-tags --sources ./packages/devextreme/js --artifacts ./artifacts/internal-tools",
"devextreme:inject-descriptions": "npm run devextreme:inject-descriptions-to-bundle && npm run devextreme:inject-descriptions-to-modules",
"angular:copy-metadata": "shx mkdir -p ./packages/devextreme-angular/metadata/ && shx cp ./artifacts/internal-tools/NGMetaData.json ./packages/devextreme-angular/metadata/",
"angular:regenerate": "nx regenerate devextreme-angular",
"angular:inject-descriptions": "dx-tools inject-descriptions --sources ./packages/devextreme-angular/npm/dist --artifacts ./artifacts/internal-tools",
"react:copy-metadata": "shx mkdir -p ./packages/devextreme-react/metadata/ && shx cp ./artifacts/internal-tools/integration-data.json ./packages/devextreme-react/metadata/",
"react:regenerate": "nx regenerate devextreme-react",
"react-storybook:start": "nx start devextreme-react-storybook",
"tools": "dx-tools",
"tools:discover-declarations": "dx-tools discover-declarations --sources ./packages/devextreme/js --exclude \"js/(renovation|__internal|.eslintrc.js)\" --compiler-options \"{ \\\"typeRoots\\\": [] }\" --artifacts ./artifacts/internal-tools",
"tools:generate-imd": "dx-tools make-integration-metadata --artifacts ./artifacts/internal-tools",
"tools:generate-ng-smd": "dx-tools make-angular-metadata --artifacts ./artifacts/internal-tools",
"tools:discover-metadata": "npm run tools:discover-declarations && npm run tools:generate-imd && npm run tools:generate-ng-smd",
"vue:copy-metadata": "shx mkdir -p ./packages/devextreme-vue/metadata/ && shx cp ./artifacts/internal-tools/integration-data.json ./packages/devextreme-vue/metadata/",
"vue:regenerate": "nx regenerate devextreme-vue",
"regenerate-all": "nx run-many -t regenerate",
"lint-staged": "lint-staged",
"prepare": "husky install",
Expand Down
4 changes: 2 additions & 2 deletions packages/devextreme-angular/build.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
tools: {
metadataGenerator: {
sourceMetadataFilePath: './metadata/NGMetaData.json',
sourceMetadataFilePath: '../devextreme/metadata/dist/NGMetaData.json',
deprecatedMetadataFilePath: './metadata/DeprecatedComponentsMetadata.json',
outputFolderPath: './metadata/generated',
nestedPathPart: 'nested',
Expand Down Expand Up @@ -55,7 +55,7 @@ module.exports = {
outputFileName: 'tests/src/server/component-names.ts'
},
commonReexportsGenerator: {
metadataPath: './metadata/NGMetaData.json',
metadataPath: '../devextreme/metadata/dist/NGMetaData.json',
outputPath: './src/'
},

Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme-angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"options": {
"script": "regenerate"
},
"dependsOn": ["devextreme-monorepo:\"angular:copy-metadata\""]
"dependsOn": ["devextreme-metadata:build"]
}
},
"tags": []
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme-react/build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
license: 'LICENSE',
readme: 'README.md'
},
metadataPath: './metadata/integration-data.json',
metadataPath: '../devextreme/metadata/dist/integration-data.json',
generatedComponentsDir: './src',
coreComponentsDir: './src/core',
indexFileName: './src/index.ts',
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme-react/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"options": {
"script": "regenerate"
},
"dependsOn": ["devextreme-monorepo:\"react:copy-metadata\""]
"dependsOn": ["devextreme-metadata:build"]
}
},
"tags": []
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme-vue/build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
license: './LICENSE',
readme: './README.md'
},
metadataPath: './metadata/integration-data.json',
metadataPath: '../devextreme/metadata/dist/integration-data.json',
generatedComponentsDir: './src',
coreComponentsDir: './src/core',
indexFileName: './src/index.ts',
Expand Down
2 changes: 1 addition & 1 deletion packages/devextreme-vue/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"options": {
"script": "regenerate"
},
"dependsOn": ["devextreme-monorepo:\"vue:copy-metadata\""]
"dependsOn": ["devextreme-metadata:build"]
}
},
"tags": []
Expand Down
21 changes: 21 additions & 0 deletions packages/devextreme/metadata/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "devextreme-metadata",
"targets": {
"build": {
"executor": "nx:run-commands",
"outputs": [
"{projectRoot}/dist"
],
"options": {
"parallel": false,
"commands": [
"dx-tools discover-declarations --sources ./packages/devextreme/js --exclude \"js/(renovation|__internal|.eslintrc.js)\" --compiler-options \"{ \\\"typeRoots\\\": [] }\" --artifacts ./packages/devextreme/metadata/dist",
"dx-tools make-integration-metadata --artifacts ./packages/devextreme/metadata/dist",
"dx-tools make-angular-metadata --artifacts ./packages/devextreme/metadata/dist"
]
},
"dependsOn": []
}
},
"implicitDependencies": ["devextreme-main"]
}

0 comments on commit a8e8bd2

Please sign in to comment.