|
4 | 4 | "sourceRoot": "packages/devextreme-react", |
5 | 5 | "projectType": "library", |
6 | 6 | "targets": { |
7 | | - "build": { |
8 | | - "executor": "nx:run-script", |
9 | | - "dependsOn": ["^build"], |
| 7 | + "clean": { |
| 8 | + "executor": "devextreme-nx-infra-plugin:clean", |
| 9 | + "options": { |
| 10 | + "targetDirectory": "./src", |
| 11 | + "excludePatterns": ["./src/core", "./src/common"], |
| 12 | + "mode": "recursive" |
| 13 | + } |
| 14 | + }, |
| 15 | + "regenerate": { |
| 16 | + "executor": "devextreme-nx-infra-plugin:generate-react-components", |
| 17 | + "dependsOn": ["devextreme-metadata:generate","clean"], |
10 | 18 | "options": { |
11 | | - "script": "pack" |
| 19 | + "metadataPath": "../devextreme-metadata/dist/integration-data.json", |
| 20 | + "componentsDir": "./src", |
| 21 | + "indexFileName": "./src/index.ts", |
| 22 | + "baseComponent": "./core/component", |
| 23 | + "extensionComponent": "./core/extension-component", |
| 24 | + "configComponent": "./core/nested-option" |
| 25 | + } |
| 26 | + }, |
| 27 | + "build:esm": { |
| 28 | + "executor": "devextreme-nx-infra-plugin:build-typescript", |
| 29 | + "dependsOn": ["npm:clean"], |
| 30 | + "options": { |
| 31 | + "srcPattern": "./src/**/*.{ts,tsx}", |
| 32 | + "excludePattern": "./src/**/__tests__/**/*", |
| 33 | + "tsconfig": "./tsconfig.esm.json", |
| 34 | + "outDir": "./npm/esm", |
| 35 | + "module": "esm" |
12 | 36 | }, |
13 | | - "inputs": [ |
14 | | - "default" |
15 | | - ], |
16 | | - "outputs": [ |
17 | | - "{projectRoot}/npm" |
18 | | - ], |
19 | | - "cache": true |
| 37 | + "outputs": ["{projectRoot}/npm/esm"], |
| 38 | + "cache": true, |
| 39 | + "inputs": ["default"] |
20 | 40 | }, |
21 | | - "pack": { |
22 | | - "executor": "nx:run-script", |
| 41 | + "build:cjs": { |
| 42 | + "executor": "devextreme-nx-infra-plugin:build-typescript", |
| 43 | + "dependsOn": ["npm:clean"], |
23 | 44 | "options": { |
24 | | - "script": "pack" |
| 45 | + "srcPattern": "./src/**/*.{ts,tsx}", |
| 46 | + "excludePattern": "./src/**/__tests__/**/*", |
| 47 | + "tsconfig": "./tsconfig.json", |
| 48 | + "outDir": "./npm/cjs", |
| 49 | + "module": "cjs" |
25 | 50 | }, |
26 | | - "inputs": [ |
27 | | - "default" |
28 | | - ], |
29 | | - "outputs": [ |
30 | | - "{projectRoot}/npm" |
31 | | - ], |
32 | | - "cache": true |
| 51 | + "outputs": ["{projectRoot}/npm/cjs"], |
| 52 | + "cache": true, |
| 53 | + "inputs": ["default"] |
33 | 54 | }, |
34 | | - "regenerate": { |
35 | | - "executor": "nx:run-script", |
36 | | - "dependsOn": ["devextreme-metadata:generate"], |
| 55 | + "npm:clean": { |
| 56 | + "executor": "devextreme-nx-infra-plugin:clean", |
| 57 | + "options": { |
| 58 | + "targetDirectory": "./npm", |
| 59 | + "mode": "simple" |
| 60 | + } |
| 61 | + }, |
| 62 | + "prepare-package-json": { |
| 63 | + "executor": "devextreme-nx-infra-plugin:prepare-package-json", |
| 64 | + "dependsOn": ["npm:clean", "build:esm", "build:cjs"], |
| 65 | + "options": {} |
| 66 | + }, |
| 67 | + "license-headers": { |
| 68 | + "executor": "devextreme-nx-infra-plugin:add-license-headers", |
| 69 | + "dependsOn": ["prepare-package-json"], |
| 70 | + "options": { |
| 71 | + "targetDirectory": "./npm", |
| 72 | + "packageJsonPath": "./package.json" |
| 73 | + } |
| 74 | + }, |
| 75 | + "npm:prepare-modules": { |
| 76 | + "executor": "devextreme-nx-infra-plugin:prepare-submodules", |
| 77 | + "dependsOn": ["npm:clean", "license-headers", "copy-files"], |
| 78 | + "options": { |
| 79 | + "distDirectory": "./npm" |
| 80 | + } |
| 81 | + }, |
| 82 | + "copy-files": { |
| 83 | + "executor": "devextreme-nx-infra-plugin:copy-files", |
| 84 | + "dependsOn": ["prepare-package-json"], |
37 | 85 | "options": { |
38 | | - "script": "regenerate" |
| 86 | + "files": [ |
| 87 | + { |
| 88 | + "from": "./LICENSE", |
| 89 | + "to": "./npm/LICENSE" |
| 90 | + }, |
| 91 | + { |
| 92 | + "from": "./README.md", |
| 93 | + "to": "./npm/README.md" |
| 94 | + } |
| 95 | + ] |
39 | 96 | } |
40 | 97 | }, |
| 98 | + "pack": { |
| 99 | + "executor": "devextreme-nx-infra-plugin:pack-npm", |
| 100 | + "dependsOn": ["npm:prepare-modules"], |
| 101 | + "options": { |
| 102 | + "workingDirectory": "./npm" |
| 103 | + }, |
| 104 | + "outputs": ["{projectRoot}/npm/*.tgz"], |
| 105 | + "cache": true, |
| 106 | + "inputs": ["default"] |
| 107 | + }, |
| 108 | + "build": { |
| 109 | + "executor": "devextreme-nx-infra-plugin:pack-npm", |
| 110 | + "dependsOn": ["npm:prepare-modules", "^build"], |
| 111 | + "options": { |
| 112 | + "workingDirectory": "./npm" |
| 113 | + }, |
| 114 | + "outputs": [ |
| 115 | + "{projectRoot}/npm", |
| 116 | + "{projectRoot}/*.tgz" |
| 117 | + ], |
| 118 | + "cache": true, |
| 119 | + "inputs": ["default"] |
| 120 | + }, |
41 | 121 | "test": { |
42 | 122 | "executor": "nx:run-script", |
43 | 123 | "options": { |
|
56 | 136 | "{projectRoot}/src/**/*", |
57 | 137 | "!{projectRoot}/src/**/__tests__/*", |
58 | 138 | "{projectRoot}/build.config.js", |
59 | | - "{projectRoot}/gulpfile.js", |
60 | 139 | "{projectRoot}/tsconfig*", |
61 | 140 | "{workspaceRoot}/tsconfig.json" |
62 | 141 | ], |
|
0 commit comments