Skip to content

Commit

Permalink
Release v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Jun 18, 2023
1 parent 6d83c2d commit e2a9bca
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Even though **run-scripts-util** is primarily intended for build scripts, the pa
Example:
``` typescript
import { runScripts } from 'run-scripts-util';

const options = { quiet: false };
runScripts.exec('compile', options);
runScripts.execParallel('watch', options);
Expand Down
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.1.0 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License
//! run-scripts-util v1.1.1 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License

export type Settings = {
only: number | null;
Expand Down
5 changes: 3 additions & 2 deletions dist/run-scripts.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! run-scripts-util v1.1.0 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License
//! run-scripts-util v1.1.1 ~~ 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 @@ -26,8 +26,9 @@ const runScripts = {
const logItems = settings.verbose ? [chalk.white(group), chalk.yellow(step), arrow] : [];
logger(...logItems, chalk.cyanBright(command));
const task = spawnSync(command, { shell: true, stdio: 'inherit' });
const errorMessage = () => `[run-scripts-util] Task: ${group} (step ${step}), Status: ${task.status}`;
if (task.status !== 0)
throw Error(`[run-scripts-util] ${group} #${step}, error status: ${task.status}`);
throw Error(errorMessage() + '\nCommand: ' + command);
logger(...logItems, chalk.green('done'), chalk.white(`(${Date.now() - startTime}ms)`));
};
const active = (step) => settings.only === null || step === settings.only;
Expand Down
5 changes: 3 additions & 2 deletions dist/run-scripts.umd.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! run-scripts-util v1.1.0 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License
//! run-scripts-util v1.1.1 ~~ https://github.com/center-key/run-scripts-util ~~ MIT License

var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
Expand Down Expand Up @@ -41,8 +41,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
const logItems = settings.verbose ? [chalk_1.default.white(group), chalk_1.default.yellow(step), arrow] : [];
logger(...logItems, chalk_1.default.cyanBright(command));
const task = (0, node_child_process_1.spawnSync)(command, { shell: true, stdio: 'inherit' });
const errorMessage = () => `[run-scripts-util] Task: ${group} (step ${step}), Status: ${task.status}`;
if (task.status !== 0)
throw Error(`[run-scripts-util] ${group} #${step}, error status: ${task.status}`);
throw Error(errorMessage() + '\nCommand: ' + command);
logger(...logItems, chalk_1.default.green('done'), chalk_1.default.white(`(${Date.now() - startTime}ms)`));
};
const active = (step) => settings.only === null || step === settings.only;
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "run-scripts-util",
"version": "1.1.0",
"version": "1.1.1",
"description": "Organize npm scripts into named groups of easy to manage commands (CLI tool designed for use in npm scripts)",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -113,19 +113,19 @@
},
"devDependencies": {
"@types/fancy-log": "~2.0",
"@types/node": "~18.15",
"@typescript-eslint/eslint-plugin": "~5.57",
"@typescript-eslint/parser": "~5.57",
"@types/node": "~20.3",
"@typescript-eslint/eslint-plugin": "~5.59",
"@typescript-eslint/parser": "~5.59",
"add-dist-header": "~1.0",
"assert-deep-strict-equal": "~1.0",
"copy-file-util": "~1.0",
"copy-folder-util": "~1.0",
"eslint": "~8.37",
"eslint": "~8.43",
"jshint": "~2.13",
"mocha": "~10.2",
"npm-run-all2": "~6.0",
"rev-web-assets": "~1.0",
"rimraf": "~4.4",
"typescript": "~5.0"
"rev-web-assets": "~1.1",
"rimraf": "~5.0",
"typescript": "~5.1"
}
}

0 comments on commit e2a9bca

Please sign in to comment.