Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute all commands in nx jobs sequentially #466

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"prepare-generator": {
"executor": "nx:run-commands",
"options": {
"commands": ["nx run language-server:generate"]
"commands": ["nx run language-server:generate"],
"parallel": false
}
},
"generate": {
Expand Down
15 changes: 10 additions & 5 deletions apps/interpreter/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"executor": "nx:run-commands",
"dependsOn": ["build"],
"options": {
"commands": ["node --enable-source-maps dist/apps/interpreter/main.js"]
"commands": ["node --enable-source-maps dist/apps/interpreter/main.js"],
"parallel": false
}
},
"test": {
Expand All @@ -52,7 +53,8 @@
"node tools/scripts/interpreter/prepend-shebang.mjs interpreter main.js",
"node tools/scripts/add-package-json-version.mjs interpreter",
"node tools/scripts/interpreter/rewrite-version-mainjs.mjs interpreter"
]
],
"parallel": false
}
},
"publish": {
Expand All @@ -61,7 +63,8 @@
"options": {
"commands": [
"node tools/scripts/publish.mjs interpreter"
]
],
"parallel": false
}
},
"pack": {
Expand All @@ -70,7 +73,8 @@
"options": {
"commands": [
"node tools/scripts/pack.mjs interpreter"
]
],
"parallel": false
}
},
"install": {
Expand All @@ -79,7 +83,8 @@
"options": {
"commands": [
"npm i -g dist/apps/interpreter/jvalue-jayvee-interpreter-*.tgz"
]
],
"parallel": false
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion apps/vs-code-extension/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"options": {
"commands": [
"code --install-extension dist/apps/vs-code-extension/jayvee.vsix"
]
],
"parallel": false
}
}
},
Expand Down
9 changes: 6 additions & 3 deletions libs/interpreter-lib/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,24 @@
"commands": [
"node tools/scripts/relax-peer-dependency-versions.mjs interpreter-lib",
"node tools/scripts/add-package-json-version.mjs interpreter-lib"
]
],
"parallel": false
}
},
"publish": {
"executor": "nx:run-commands",
"dependsOn": ["pre-publish"],
"options": {
"commands": ["node tools/scripts/publish.mjs interpreter-lib"]
"commands": ["node tools/scripts/publish.mjs interpreter-lib"],
"parallel": false
}
},
"pack": {
"executor": "nx:run-commands",
"dependsOn": ["pre-publish"],
"options": {
"commands": ["node tools/scripts/pack.mjs interpreter-lib"]
"commands": ["node tools/scripts/pack.mjs interpreter-lib"],
"parallel": false
}
}
},
Expand Down
9 changes: 6 additions & 3 deletions libs/language-server/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,24 @@
"commands": [
"node tools/scripts/relax-peer-dependency-versions.mjs language-server",
"node tools/scripts/add-package-json-version.mjs language-server"
]
],
"parallel": false
}
},
"publish": {
"executor": "nx:run-commands",
"dependsOn": ["pre-publish"],
"options": {
"commands": ["node tools/scripts/publish.mjs language-server"]
"commands": ["node tools/scripts/publish.mjs language-server"],
"parallel": false
}
},
"pack": {
"executor": "nx:run-commands",
"dependsOn": ["pre-publish"],
"options": {
"commands": ["node tools/scripts/pack.mjs language-server"]
"commands": ["node tools/scripts/pack.mjs language-server"],
"parallel": false
}
}
},
Expand Down
6 changes: 4 additions & 2 deletions libs/monaco-editor/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
"options": {
"commands": [
"node tools/scripts/publish.mjs monaco-editor"
]
],
"parallel": false
}
},
"pack": {
Expand All @@ -73,7 +74,8 @@
"options": {
"commands": [
"node tools/scripts/pack.mjs monaco-editor"
]
],
"parallel": false
}
}
},
Expand Down
8 changes: 5 additions & 3 deletions tools/scripts/interpreter/prepend-shebang.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
//
// SPDX-License-Identifier: AGPL-3.0-only

import {getOutputPath} from "../shared-util.mjs";
import fs from "fs";
import { getOutputPath } from '../shared-util.mjs';
import fs from 'fs';

// Executing this script: node path/to/prepend-shebang.mjs {projectName} {file}
const [, , projectName, file] = process.argv;
const shebang = '#!/usr/bin/env node';

process.chdir(getOutputPath(projectName));

const previousFileContent = fs.readFileSync(file)
console.log(`Prepending shebang to file ${process.cwd()}/${file}`);
const previousFileContent = fs.readFileSync(file);
fs.writeFileSync(file, `${shebang}\n${previousFileContent}`);
console.log(`Finished appending shebang!`);
Loading