From aefaf3819aceef4499b4487016e4f016eda2bc1d Mon Sep 17 00:00:00 2001 From: vsavkin Date: Wed, 30 Aug 2017 10:36:53 -0400 Subject: [PATCH] add copy-to-cli to improve the dev experience --- package.json | 1 + .../bazel/src/workspace/files/BUILD.bazel__tmpl__ | 5 ++++- .../bazel/src/workspace/files/package.json__tmpl__ | 1 + packages/nx/package.json | 3 +-- scripts/copy-to-cli.sh | 13 +++++++++++++ 5 files changed, 20 insertions(+), 3 deletions(-) create mode 100755 scripts/copy-to-cli.sh diff --git a/package.json b/package.json index 0a9e0e6a19..35e5699b76 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "link": "./scripts/link.sh", "package": "./scripts/package.sh", "release": "./scripts/release.sh", + "copy-to-cli": "./scripts/copy-to-cli.sh", "test": "yarn build && ./scripts/test.sh" }, "dependencies" :{ diff --git a/packages/bazel/src/workspace/files/BUILD.bazel__tmpl__ b/packages/bazel/src/workspace/files/BUILD.bazel__tmpl__ index 4ad95a5351..61956ee076 100644 --- a/packages/bazel/src/workspace/files/BUILD.bazel__tmpl__ +++ b/packages/bazel/src/workspace/files/BUILD.bazel__tmpl__ @@ -5,4 +5,7 @@ filegroup(name = "node_modules", srcs = glob([ "node_modules/**/*.json", "node_modules/**/*.js", "node_modules/**/*.d.ts", -], exclude=["node_modules/@angular/cli/**"])) +], exclude=[ + "node_modules/@angular/cli/**", + "node_modules/fileset/**" +])) diff --git a/packages/bazel/src/workspace/files/package.json__tmpl__ b/packages/bazel/src/workspace/files/package.json__tmpl__ index 1c58e5c928..df15e51cdb 100644 --- a/packages/bazel/src/workspace/files/package.json__tmpl__ +++ b/packages/bazel/src/workspace/files/package.json__tmpl__ @@ -29,6 +29,7 @@ "devDependencies": { "@angular/cli": "https://github.com/nrwl/bazel-cli-build", "@bazel/typescript": "~0.0.7", + "@nrwl/schematics": "https://github.com/nrwl/schematics-build", "@nrwl/bazel": "https://github.com/nrwl/bazel-build", "@angular/bazel": "angular/bazel-builds#6f50535", "@angular/compiler-cli": "angular/compiler-cli-builds#797acb2", diff --git a/packages/nx/package.json b/packages/nx/package.json index 84c1e88735..e5aac2435a 100644 --- a/packages/nx/package.json +++ b/packages/nx/package.json @@ -4,8 +4,7 @@ "description": "Angular Extensions", "main": "index.js", "dependencies" :{ - "jasmine-marbles": "0.1.0", - "@nrwl/schematics": "0.0.1" + "jasmine-marbles": "0.1.0" }, "peerDependencies" :{ "rxjs": ">5.4.2", diff --git a/scripts/copy-to-cli.sh b/scripts/copy-to-cli.sh new file mode 100755 index 0000000000..6cdd0ed838 --- /dev/null +++ b/scripts/copy-to-cli.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +./scripts/build.sh + + +path=${PWD} +echo $path +# sed -i "" "s|https://github.com/nrwl/schematics-build|file:$1/node_modules/@nrwl/schematics|g" build/packages/bazel/package.json +sed -i "" "s|https://github.com/nrwl/bazel-build|file:$1/node_modules/@nrwl/bazel|g" build/packages/bazel/src/workspace/files/package.json__tmpl__ +sed -i "" "s|https://github.com/nrwl/schematics-build|file:$1/node_modules/@nrwl/schematics|g" build/packages/bazel/src/workspace/files/package.json__tmpl__ + +rm -rf $1/node_modules/@nrwl +cp -r build/packages $1/node_modules/@nrwl