Skip to content

Commit

Permalink
Release v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Aug 14, 2024
1 parent 3f19f75 commit a5f3c60
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ See the **TypeScript Declarations** at the top of [recursive-exec.ts](recursive-
- 🪺 [recursive-exec](https://github.com/center-key/recursive-exec):  _Run a command on each file in a folder and its subfolders_
- 🔍 [replacer-util](https://github.com/center-key/replacer-util):  _Find and replace strings or template outputs in text files_
- 🔢 [rev-web-assets](https://github.com/center-key/rev-web-assets):  _Revision web asset filenames with cache busting content hash fingerprints_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into named groups of easy to manage commands_
- 🚆 [run-scripts-util](https://github.com/center-key/run-scripts-util):  _Organize npm package.json scripts into groups of easy to manage commands_
- 🚦 [w3c-html-validator](https://github.com/center-key/w3c-html-validator):  _Check the markup validity of HTML files using the W3C validator_

Feel free to submit questions at:<br>
Expand Down
2 changes: 1 addition & 1 deletion dist/recursive-exec.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! recursive-exec v1.0.0 ~~ https://github.com/center-key/recursive-exec ~~ MIT License
//! recursive-exec v1.0.1 ~~ https://github.com/center-key/recursive-exec ~~ MIT License

export type Settings = {
echo: boolean;
Expand Down
8 changes: 4 additions & 4 deletions dist/recursive-exec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! recursive-exec v1.0.0 ~~ https://github.com/center-key/recursive-exec ~~ MIT License
//! recursive-exec v1.0.1 ~~ https://github.com/center-key/recursive-exec ~~ MIT License

import { globSync } from 'glob';
import { spawnSync } from 'node:child_process';
Expand All @@ -21,14 +21,14 @@ const recursiveExec = {
!command ? 'Command template missing.' :
null;
if (errorMessage)
throw Error('[recursive-exec] ' + errorMessage);
throw new Error('[recursive-exec] ' + errorMessage);
const startTime = Date.now();
const source = slash(path.normalize(folder)).replace(/\/$/, '');
const logName = chalk.gray('recursive-exec');
const getExts = () => settings.extensions.join('|');
const extensions = !settings.extensions ? '' : `@(${getExts()})`;
const files = globSync(source + '/**/*' + extensions, { ignore: '**/node_modules/**/*', nodir: true });
const excludes = settings?.excludes || [];
const excludes = settings.excludes || [];
const keep = (file) => !excludes.find(exclude => file.includes(exclude));
const toCamel = (token) => token.replace(/-./g, char => char[1].toUpperCase());
if (!settings.quiet)
Expand Down Expand Up @@ -64,7 +64,7 @@ const recursiveExec = {
log(logName, chalk.blue.bold('command:'), chalk.cyanBright(result.command));
const task = spawnSync(result.command, { shell: true, stdio: 'inherit' });
if (task.status !== 0)
throw Error(`[recursive-exec] Status: ${task.status}\nCommand: ${result.command}`);
throw new Error(`[recursive-exec] Status: ${task.status}\nCommand: ${result.command}`);
};
results.forEach(settings.echo ? previewCommand : execCommand);
const summary = `(files: ${results.length}, ${Date.now() - startTime}ms)`;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "recursive-exec",
"version": "1.0.0",
"version": "1.0.1",
"description": "Run a command on each file in a folder and its subfolders (CLI tool designed for use in npm package.json scripts)",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -69,7 +69,7 @@
"devDependencies": {
"@eslint/js": "~9.9",
"@types/fancy-log": "~2.0",
"@types/node": "~22.2",
"@types/node": "~22.3",
"add-dist-header": "~1.4",
"assert-deep-strict-equal": "~1.2",
"copy-file-util": "~1.2",
Expand Down

0 comments on commit a5f3c60

Please sign in to comment.