diff --git a/build/config.ts b/build/config.ts index dca0da8283..dca749aa95 100644 --- a/build/config.ts +++ b/build/config.ts @@ -9,7 +9,7 @@ export interface Config { scope: string; } -export const modulesDir = './modules/'; +const modulesDir = './modules/'; export const packages: PackageDescription[] = fs .readdirSync(modulesDir) .filter(path => { diff --git a/build/copy-schematics-core.ts b/build/copy-schematics-core.ts deleted file mode 100644 index 73d57be872..0000000000 --- a/build/copy-schematics-core.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as tasks from './tasks'; -import { createBuilder } from './util'; -import { packages } from './config'; - -const copySchematics = createBuilder([ - ['Copy Schematics Core Files', tasks.copySchematicsCore], -]); - -copySchematics({ - scope: '@ngrx', - packages, -}).catch(err => { - console.error(err); - process.exit(1); -}); diff --git a/build/tasks.ts b/build/tasks.ts index ec6eb00238..57ef68fb11 100644 --- a/build/tasks.ts +++ b/build/tasks.ts @@ -1,34 +1,5 @@ -import { Config, modulesDir } from './config'; +import { Config } from './config'; import * as util from './util'; -import * as fs from 'fs'; -import { ncp } from 'ncp'; - -/** - * - * Copies the schematics-core package into any package that provides - * schematics or migrations - */ -export async function copySchematicsCore(config: Config) { - (ncp as any).limit = 1; - for (let pkg of util.getTopLevelPackages(config)) { - const packageJson = fs - .readFileSync(`${modulesDir}${pkg}/package.json`) - .toString('utf-8'); - const pkgConfig = JSON.parse(packageJson); - - if (pkgConfig.schematics || pkgConfig['ng-update'].migrations) { - ncp( - `${modulesDir}/schematics-core`, - `${modulesDir}/${pkg}/src/schematics-core`, - function(err: any) { - if (err) { - return console.error(err); - } - } - ); - } - } -} /** * Deploy build artifacts to repos diff --git a/package.json b/package.json index 60add756c4..0db640dcab 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "scripts": { "precommit": "lint-staged", "bootstrap": "lerna bootstrap", - "prebuild": "yarn copy:schematics", "build": "bazel build ...", "deploy:builds": "ts-node ./build/deploy-build.ts", "test:unit": "node ./tests.js", @@ -27,7 +26,7 @@ "codegen": "ts-node modules/codegen/src/index.ts", "prebuildifier": "bazel build --noshow_progress @com_github_bazelbuild_buildtools//buildifier", "buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/buildifier", - "copy:schematics": "ts-node ./build/copy-schematics-core.ts" + "copy:schematics": "ncp modules/schematics-core/ modules/schematics/src/schematics-core/" }, "engines": { "node": ">=8.9.0", @@ -95,7 +94,6 @@ "@types/jasminewd2": "^2.0.2", "@types/jest": "^20.0.2", "@types/lodash": "^4.14.80", - "@types/ncp": "^2.0.1", "@types/node": "^7.0.5", "@types/ora": "^1.3.1", "@types/rimraf": "^0.0.28", diff --git a/yarn.lock b/yarn.lock index b4eedd0df9..0c270cbd72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -279,12 +279,6 @@ version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" -"@types/ncp@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/ncp/-/ncp-2.0.1.tgz#749432511f6ad747d04e98837b18cca9045567fb" - dependencies: - "@types/node" "*" - "@types/node@*": version "10.0.6" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.0.6.tgz#c0bce8e539bf34c1b850c13ff46bead2fecc2e58"