Skip to content

Commit

Permalink
Release v1.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Feb 18, 2024
1 parent 7e4a35e commit 107392f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/run-scripts.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! run-scripts-util v1.2.4 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License
//! run-scripts-util v1.2.5 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License

export type Settings = {
only: number | null;
Expand Down
8 changes: 4 additions & 4 deletions dist/run-scripts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! run-scripts-util v1.2.4 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License
//! run-scripts-util v1.2.5 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License

import { spawn, spawnSync } from 'node:child_process';
import chalk from 'chalk';
Expand Down Expand Up @@ -34,11 +34,11 @@ const runScripts = {
logger(...logItems, chalk.green('done'), chalk.white(`(${Date.now() - startTime}ms)`));
};
const skip = (step, command) => {
const inactive = step === settings.only;
const commentedOut = command.startsWith('-');
const active = settings.only === null || step === settings.only;
const commentedOut = command.startsWith('//') || command.startsWith('-');
if (commentedOut)
logger(chalk.yellow('skipping:'), command);
return inactive || commentedOut;
return !active || commentedOut;
};
commands.forEach((command, index) => !skip(index + 1, command) && execCommand(index + 1, command));
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "run-scripts-util",
"version": "1.2.4",
"version": "1.2.5",
"description": "Organize npm package.json scripts into named groups of easy to manage commands (CLI tool designed for use in npm package.json scripts)",
"license": "MIT",
"type": "module",
Expand Down

0 comments on commit 107392f

Please sign in to comment.