Skip to content

Commit

Permalink
build(nx): clean up build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Jul 13, 2019
1 parent c16f250 commit f1f0663
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 24 deletions.
29 changes: 15 additions & 14 deletions packages/create-nx-workspace/bin/create-nx-workspace.ts
Expand Up @@ -103,17 +103,18 @@ execSync(
}
);

try {
execSync('nx --version');
} catch (e) {
// no nx found
console.log('-----------------------------------------------------------');
console.log(`It looks like you don't have the Nx CLI installed globally.`);
console.log(
`This means that you might have to use "yarn nx" or "npm nx" to execute commands in your workspace.`
);
console.log(
`If you want to execute the nx command directly, run "yarn global add @nrwl/cli" or "npm install -g @nrwl/cli"`
);
console.log('-----------------------------------------------------------');
}
// TODO: vsavkin: reenable for 8.4
// try {
// execSync('nx --version');
// } catch (e) {
// // no nx found
// console.log('-----------------------------------------------------------');
// console.log(`It looks like you don't have the Nx CLI installed globally.`);
// console.log(
// `This means that you might have to use "yarn nx" or "npm nx" to execute commands in your workspace.`
// );
// console.log(
// `If you want to execute the nx command directly, run "yarn global add @nrwl/cli" or "npm install -g @nrwl/cli"`
// );
// console.log('-----------------------------------------------------------');
// }
3 changes: 0 additions & 3 deletions scripts/build.sh
Expand Up @@ -28,9 +28,6 @@ rm -rf build/packages/angular/bundles/nrwl-angular-testing.umd.js.bak
rm -rf build/packages/angular/bundles/nrwl-angular-testing.umd.min.js.bak

rsync -a --exclude=*.ts packages/ build/packages

chmod +x build/packages/create-nx-workspace/bin/create-nx-workspace.js
chmod +x build/packages/workspace/src/command-line/nx.js
chmod +x build/packages/cli/bin/nx.js

rm -rf build/packages/install
Expand Down
1 change: 0 additions & 1 deletion scripts/check-imports.js
Expand Up @@ -27,7 +27,6 @@ function allFilesInDir(dirName) {
function check() {
const exceptions = [
'packages/create-nx-workspace/bin/create-nx-workspace.ts',
'packages/workspace/bin/create-nx-workspace.ts',
'packages/web/src/builders/build/build.impl.ts',
'packages/web/src/builders/build/build.impl.spec.ts',
'packages/web/src/utils/web.config.ts',
Expand Down
6 changes: 0 additions & 6 deletions scripts/package.sh
Expand Up @@ -21,18 +21,12 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i "" "s|NX_VERSION|$NX_VERSION|g" create-nx-workspace/bin/create-nx-workspace.js
sed -i "" "s|ANGULAR_CLI_VERSION|$ANGULAR_CLI_VERSION|g" create-nx-workspace/bin/create-nx-workspace.js
sed -i "" "s|TYPESCRIPT_VERSION|$TYPESCRIPT_VERSION|g" create-nx-workspace/bin/create-nx-workspace.js
sed -i "" "s|NX_VERSION|$NX_VERSION|g" workspace/bin/create-nx-workspace.js
sed -i "" "s|ANGULAR_CLI_VERSION|$ANGULAR_CLI_VERSION|g" workspace/bin/create-nx-workspace.js
sed -i "" "s|TYPESCRIPT_VERSION|$TYPESCRIPT_VERSION|g" workspace/bin/create-nx-workspace.js
else
sed -i "s|exports.nxVersion = '\*';|exports.nxVersion = '$NX_VERSION';|g" {react,web,jest,node,express,nest,cypress,angular,workspace}/src/utils/versions.js
sed -i "s|\*|$NX_VERSION|g" {schematics,react,web,jest,node,express,nest,cypress,angular,workspace}/package.json
sed -i "s|NX_VERSION|$NX_VERSION|g" create-nx-workspace/bin/create-nx-workspace.js
sed -i "s|ANGULAR_CLI_VERSION|$ANGULAR_CLI_VERSION|g" create-nx-workspace/bin/create-nx-workspace.js
sed -i "s|TYPESCRIPT_VERSION|$TYPESCRIPT_VERSION|g" create-nx-workspace/bin/create-nx-workspace.js
sed -i "s|NX_VERSION|$NX_VERSION|g" workspace/bin/create-nx-workspace.js
sed -i "s|ANGULAR_CLI_VERSION|$ANGULAR_CLI_VERSION|g" workspace/bin/create-nx-workspace.js
sed -i "s|TYPESCRIPT_VERSION|$TYPESCRIPT_VERSION|g" workspace/bin/create-nx-workspace.js
fi

if [[ $NX_VERSION == "*" ]]; then
Expand Down

0 comments on commit f1f0663

Please sign in to comment.