Skip to content

Commit

Permalink
Revert "build: Add script to copy schematics-core to supported packag…
Browse files Browse the repository at this point in the history
…es (#1052)" (#1055)

This reverts commit ed31bf1.
  • Loading branch information
brandonroberts authored May 11, 2018
1 parent ed31bf1 commit 92c13fd
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 55 deletions.
2 changes: 1 addition & 1 deletion build/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
15 changes: 0 additions & 15 deletions build/copy-schematics-core.ts

This file was deleted.

31 changes: 1 addition & 30 deletions build/tasks.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
6 changes: 0 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 92c13fd

Please sign in to comment.