Skip to content

Commit

Permalink
Switch to "//" comment notation to parallel js
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Feb 18, 2024
1 parent 3289634 commit 7e4a35e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ Examples:
_**Note:** Single quotes in commands are normalized so they work cross-platform and avoid the errors often encountered on Microsoft Windows._

### 4. Skip a command
To _comment out_ a command prepend a dash (`-`) to the command.
To _comment out_ a command prepend two slashes (`//`) to the command.

In the example below, the first `tsc` command will be skipped while the `tsc --verbose` command will be executed:
```json
"runScriptsConfig": {
"compile": [
"- tsc",
"//tsc",
"tsc --verbose",
"lessc src/web-app/style.less build/web-app/style.css"
]
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"runScriptsConfig": {
"spec-a": [
"copy-folder bin spec/fixtures/target/a",
"- echo 'This command will be skipped.'",
"//echo 'This command will be skipped.'",
"copy-file spec/fixtures/target/a/cli.js spec/fixtures/target/a/cli2.js",
"copy-folder .github/workflows spec/fixtures/target/a"
],
Expand Down Expand Up @@ -112,15 +112,15 @@
"devDependencies": {
"@types/fancy-log": "~2.0",
"@types/node": "~20.11",
"@typescript-eslint/eslint-plugin": "~6.19",
"@typescript-eslint/parser": "~6.19",
"add-dist-header": "~1.3",
"assert-deep-strict-equal": "~1.1",
"@typescript-eslint/eslint-plugin": "~7.0",
"@typescript-eslint/parser": "~7.0",
"add-dist-header": "~1.4",
"assert-deep-strict-equal": "~1.2",
"copy-file-util": "~1.1",
"copy-folder-util": "~1.1",
"eslint": "~8.56",
"jshint": "~2.13",
"mocha": "~10.2",
"mocha": "~10.3",
"npm-run-all2": "~6.1",
"rimraf": "~5.0",
"typescript": "~5.3"
Expand Down
2 changes: 1 addition & 1 deletion run-scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const runScripts = {
};
const skip = (step: number, command: string) => {
const active = settings.only === null || step === settings.only;
const commentedOut = command.startsWith('-');
const commentedOut = command.startsWith('//') || command.startsWith('-'); //DEPRECATED: single dash comments
if (commentedOut)
logger(chalk.yellow('skipping:'), command);
return !active || commentedOut;
Expand Down

0 comments on commit 7e4a35e

Please sign in to comment.