diff --git a/lib/core/project.json b/lib/core/project.json index 3179f822a6..51b9edab3b 100644 --- a/lib/core/project.json +++ b/lib/core/project.json @@ -24,13 +24,13 @@ "defaultConfiguration": "production" }, "build-schematics": { - "executor": "nx:run-commands", + "executor": "@nrwl/js:tsc", + "outputs": ["{options.outputPath}"], "options": { - "commands": [ - { - "command": "npx tsc -p lib/core/tsconfig.schematics.json && cp lib/core/schematics/migrations/collection.json dist/libs/core/schematics/migrations/collection.json" - } - ] + "outputPath": "dist/libs/core/schematics/migrations", + "main": "lib/core/schematics/migrations/index.ts", + "tsConfig": "lib/core/tsconfig.schematics.json", + "externalBuildTargets": ["build-schematics"] } }, "test": { diff --git a/lib/core/schematics/migrations/collection.json b/lib/core/schematics/migrations/collection.json index 5dbddf0794..56436c6df5 100644 --- a/lib/core/schematics/migrations/collection.json +++ b/lib/core/schematics/migrations/collection.json @@ -1,5 +1,5 @@ { - "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", + "$schema": "../../../../node_modules/@angular-devkit/schematics/collection-schema.json", "schematics": { "move-out-alfresco-api": { "description": "Update alfresco-api imports", diff --git a/lib/core/tsconfig.nx.migrations.json b/lib/core/tsconfig.nx.migrations.json index 7b90cdf8eb..39388c6bfe 100644 --- a/lib/core/tsconfig.nx.migrations.json +++ b/lib/core/tsconfig.nx.migrations.json @@ -21,7 +21,8 @@ "sourceMap": true, "strictNullChecks": true, "target": "es2015", - "types": [] + "typeRoots": ["node_modules/@types"], + "types": ["node"] }, "include": [ "migrations/**/*" diff --git a/lib/core/tsconfig.schematics.json b/lib/core/tsconfig.schematics.json index a9cd3d8a35..763d6e684f 100644 --- a/lib/core/tsconfig.schematics.json +++ b/lib/core/tsconfig.schematics.json @@ -20,7 +20,8 @@ "sourceMap": true, "strictNullChecks": true, "target": "es2015", - "types": [] + "typeRoots": ["node_modules/@types"], + "types": ["node"] }, "include": [ "schematics/**/*" diff --git a/lib/js-api/tsconfig.json b/lib/js-api/tsconfig.json index c4d1b98a8f..0587147f7c 100644 --- a/lib/js-api/tsconfig.json +++ b/lib/js-api/tsconfig.json @@ -18,7 +18,7 @@ "outDir": "./.out", "lib": ["es2018", "dom"], "typeRoots": ["node_modules/@types"], - "types": [] + "types": ["node"] }, "exclude": [".history", "*/node_modules", "config", "performance", "coverage", "node_modules", "package", "dist", "test"] } diff --git a/nx.json b/nx.json index 99666ee72a..b69162f329 100644 --- a/nx.json +++ b/nx.json @@ -7,25 +7,45 @@ "$schema": "./node_modules/nx/schemas/nx-schema.json", "targetDefaults": { "build": { - "dependsOn": ["^build"], - "inputs": ["production", "^production"] + "dependsOn": [ + "^build" + ], + "inputs": [ + "production", + "^production" + ] }, "build-storybook": { - "inputs": ["default", "^production", "{projectRoot}/.storybook/**/*", "{projectRoot}/tsconfig.storybook.json"] + "inputs": [ + "default", + "^production", + "{projectRoot}/.storybook/**/*", + "{projectRoot}/tsconfig.storybook.json" + ] } }, "tasksRunnerOptions": { "default": { "runner": "nx/tasks-runners/default", "options": { - "cacheableOperations": ["build", "lint", "test", "stylelint"], + "cacheableOperations": [ + "build", + "lint", + "test", + "stylelint" + ], "cacheDirectory": "nxcache", - "runtimeCacheInputs": ["node -v"] + "runtimeCacheInputs": [ + "node -v" + ] } } }, "namedInputs": { - "default": ["{projectRoot}/**/*", "sharedGlobals"], + "default": [ + "{projectRoot}/**/*", + "sharedGlobals" + ], "sharedGlobals": [ "{workspaceRoot}/angular.json", "{workspaceRoot}/demo-shell/src/index.html",