Skip to content

Commit

Permalink
fix(misc): do not set includeScript during nx init
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Nov 30, 2022
1 parent 51762b0 commit ad201d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/nx/src/command-line/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { addNxToNpmRepo } from '../nx-init/add-nx-to-npm-repo';
export async function initHandler() {
const args = process.argv.slice(2).join(' ');
const version = process.env.NX_VERSION ?? 'latest';
if (process.env.NX_VERSION) {
console.log(`Using version ${process.env.NX_VERSION}`);
}
if (existsSync('package.json')) {
if (existsSync('angular.json')) {
// TODO(leo): remove make-angular-cli-faster
Expand Down
3 changes: 1 addition & 2 deletions packages/nx/src/nx-init/add-nx-to-npm-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ export function markRootPackageJsonAsNxProject(
scriptOutputs: { [script: string]: string }
) {
const json = readJsonFile(joinPathFragments(repoRoot, `package.json`));
json.nx = { includeScripts: cacheableScripts };
json.nx.targets = {};
for (let script of Object.keys(scriptOutputs)) {
if (scriptOutputs[script]) {
json.nx.targets ||= {};
json.nx.targets[script] = {
outputs: [`{projectRoot}/${scriptOutputs[script]}`],
};
Expand Down

0 comments on commit ad201d5

Please sign in to comment.