-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
96 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,63 +20,75 @@ shell.mkdir(path.join(tmp, 'proj-nx')); | |
|
||
shell.rm('-rf', path.join(tmp, 'ng')); | ||
shell.mkdir(path.join(tmp, 'ng')); | ||
|
||
cp.execSync('yarn add @angular/[email protected]', { cwd: path.join(tmp, 'ng') }); | ||
cp.execSync('yarn add @nrwl/[email protected]', { cwd: path.join(tmp, 'ng') }); | ||
|
||
cp.execSync('ng config -g cli.packageManager yarn'); | ||
cp.execSync( | ||
|
||
cp.exec( | ||
`${path.join( | ||
tmp, | ||
'ng' | ||
)}/node_modules/.bin/ng new proj --collection=@schematics/angular --directory=proj --skip-git --no-interactive`, | ||
{ cwd: tmp, stdio: [0, 1, 2] } | ||
); | ||
const angularJson = JSON.parse( | ||
fs.readFileSync(path.join(tmp, 'proj', 'angular.json')).toString() | ||
); | ||
angularJson.schematics = { | ||
'@schematics/angular:service': { | ||
flat: false | ||
} | ||
}; | ||
fs.writeFileSync( | ||
path.join(tmp, 'proj', 'angular.json'), | ||
JSON.stringify(angularJson, null, 2) | ||
); | ||
{ cwd: tmp, stdio: [0, 1, 2] }, | ||
() => { | ||
const angularJson = JSON.parse( | ||
fs.readFileSync(path.join(tmp, 'proj', 'angular.json')).toString() | ||
); | ||
angularJson.schematics = { | ||
'@schematics/angular:service': { | ||
flat: false | ||
} | ||
}; | ||
fs.writeFileSync( | ||
path.join(tmp, 'proj', 'angular.json'), | ||
JSON.stringify(angularJson, null, 2) | ||
); | ||
|
||
const karma = fs | ||
.readFileSync(path.join(tmp, 'proj', 'src', 'karma.conf.js')) | ||
.toString(); | ||
fs.writeFileSync( | ||
path.join(tmp, 'proj', 'src', 'karma.conf.js'), | ||
karma.replace('Chrome', 'ChromeHeadless') | ||
); | ||
const karma = fs | ||
.readFileSync(path.join(tmp, 'proj', 'src', 'karma.conf.js')) | ||
.toString(); | ||
fs.writeFileSync( | ||
path.join(tmp, 'proj', 'src', 'karma.conf.js'), | ||
karma.replace('Chrome', 'ChromeHeadless') | ||
); | ||
|
||
shell.mv(path.join(tmp, 'proj'), './tmp/proj'); | ||
shell.mv(path.join(tmp, 'proj'), './tmp/proj'); | ||
} | ||
); | ||
|
||
cp.execSync( | ||
cp.exec( | ||
`${path.join( | ||
tmp, | ||
'ng' | ||
)}/node_modules/.bin/ng new proj-extensions --collection=@schematics/angular --directory=proj-extensions --skip-git --no-interactive`, | ||
{ cwd: tmp, stdio: [0, 1, 2] } | ||
{ cwd: tmp, stdio: [0, 1, 2] }, | ||
() => { | ||
shell.mv(path.join(tmp, 'proj-extensions'), './tmp/proj-extensions'); | ||
} | ||
); | ||
shell.mv(path.join(tmp, 'proj-extensions'), './tmp/proj-extensions'); | ||
|
||
cp.execSync( | ||
cp.exec( | ||
`${path.join( | ||
tmp, | ||
'ng' | ||
)}/node_modules/.bin/ng new proj-no-node-modules --collection=@schematics/angular --directory=proj-no-node-modules --skip-install --skip-git --no-interactive`, | ||
{ cwd: tmp, stdio: [0, 1, 2] } | ||
{ cwd: tmp, stdio: [0, 1, 2] }, | ||
() => { | ||
shell.mv( | ||
path.join(tmp, 'proj-no-node-modules'), | ||
'./tmp/proj-no-node-modules' | ||
); | ||
} | ||
); | ||
shell.mv(path.join(tmp, 'proj-no-node-modules'), './tmp/proj-no-node-modules'); | ||
|
||
cp.execSync( | ||
`${path.join( | ||
tmp, | ||
'ng' | ||
)}/node_modules/.bin/ng new proj-nx --collection=@nrwl/schematics --directory=proj-nx --skip-git --no-interactive`, | ||
{ cwd: tmp, stdio: [0, 1, 2] } | ||
{ cwd: tmp, stdio: [0, 1, 2] }, | ||
() => { | ||
shell.mv(path.join(tmp, 'proj-nx'), './tmp/proj-nx'); | ||
} | ||
); | ||
shell.mv(path.join(tmp, 'proj-nx'), './tmp/proj-nx'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -496,10 +496,10 @@ | |
trix "^1.0.0" | ||
tslib "^1.9.0" | ||
|
||
"@nrwl/[email protected].1": | ||
version "7.5.1" | ||
resolved "https://registry.yarnpkg.com/@nrwl/builders/-/builders-7.5.1.tgz#b8097f8748e6292ede7f446ea6c4ac7d2b4d2266" | ||
integrity sha512-68+c6aDv4l/h9rnG1i9ROz9a/zxA9BAoRy0A4VB9KbJ7hLIJ5zbKHrfQVbBh0OdCLc5eQIQt3Vl882jl2/j4MA== | ||
"@nrwl/[email protected].2": | ||
version "7.5.2" | ||
resolved "https://registry.yarnpkg.com/@nrwl/builders/-/builders-7.5.2.tgz#7e024c3a1eadc8b50fa43735c96353c8e0b11ad7" | ||
integrity sha512-Yazl0YnqntRCkKiKeWdMpUkshus3FXZ0eNs6el/yvtQfWqoD+Z7BNrW4MCFVlGKtpOUQi+Gow/seFPrfjGryHg== | ||
dependencies: | ||
"@angular-devkit/architect" "~0.12.1" | ||
"@angular-devkit/build-webpack" "~0.12.1" | ||
|
@@ -512,15 +512,15 @@ | |
webpack-dev-server "3.1.14" | ||
webpack-node-externals "1.7.2" | ||
|
||
"@nrwl/[email protected].1": | ||
version "7.5.1" | ||
resolved "https://registry.yarnpkg.com/@nrwl/nx/-/nx-7.5.1.tgz#890d7b79f5a6c9a564d18fe28e841e3e7ecdb0d0" | ||
integrity sha512-OegS/kwlClfCcaffVtYuTDz6zMJzrOLlVotblgPfTRd4CJrylN3wLbPlM8U80XoGSpQTKCyfzzPlKsu6ikp7rg== | ||
"@nrwl/[email protected].2": | ||
version "7.5.2" | ||
resolved "https://registry.yarnpkg.com/@nrwl/nx/-/nx-7.5.2.tgz#df8c8d68d2645b20ac9ce054938a0371a2c3f4ba" | ||
integrity sha512-z0xWeHKNic/lEusP1pwgbv7bIB2UvT4Yc/GMAUH/wD/Y8E8L4lc3Y64cofwrvE3WJTY4ainsvYH/XkFqAOPxpA== | ||
|
||
"@nrwl/[email protected].1": | ||
version "7.5.1" | ||
resolved "https://registry.yarnpkg.com/@nrwl/schematics/-/schematics-7.5.1.tgz#717bf80f7273a00f469cfe33a4cb27fc7eadbbb5" | ||
integrity sha512-4gVHUsD15qInVa4uMOrj8YS2KECFA4a5/BkgAPiR5GX3WnCStahp6JaXyPa1aeJ6RCaW4iFvHr3AlfL4UvE8CQ== | ||
"@nrwl/[email protected].2": | ||
version "7.5.2" | ||
resolved "https://registry.yarnpkg.com/@nrwl/schematics/-/schematics-7.5.2.tgz#b0be5a708e733e798dd1f7cec2341e5062703236" | ||
integrity sha512-AqbNJ782UodR5y56yg4LCsIxXTORBE2wiGRI5yAD+QpAGL+vw8gdRzTNxgzoFsgowNkzW0Czfo1ezPtFCEvl+Q== | ||
dependencies: | ||
"@types/yargs" "^11.0.0" | ||
app-root-path "^2.0.1" | ||
|