From 4893fdce5e89f7d809947510e891db262609c45e Mon Sep 17 00:00:00 2001 From: dpilafian Date: Tue, 15 Aug 2023 22:45:01 -0700 Subject: [PATCH] Release v1.2.1 --- README.md | 1 + dist/cli-argv-util.d.ts | 3 ++- dist/cli-argv-util.js | 7 ++++++- package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a2d7b8a..96e1532 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ See the **TypeScript Declarations** at the top of [cli-argv-util.ts](cli-argv-ut - 🎋 [add-dist-header](https://github.com/center-key/add-dist-header):  _Prepend a one-line banner comment (with license notice) to distribution files_ - 📄 [cli-argv-util](https://github.com/center-key/cli-argv-util):  _Copy or rename a file with optional package version number_ - 📂 [copy-folder-util](https://github.com/center-key/copy-folder-util):  _Recursively copy files from one folder to another folder_ + - 🪺 [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 scripts into named groups of easy to manage commands_ diff --git a/dist/cli-argv-util.d.ts b/dist/cli-argv-util.d.ts index 2826e33..a9bb02e 100644 --- a/dist/cli-argv-util.d.ts +++ b/dist/cli-argv-util.d.ts @@ -1,4 +1,4 @@ -//! cli-argv-util v1.2.0 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License +//! cli-argv-util v1.2.1 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License export type StringFlagMap = { [flag: string]: string | undefined; @@ -19,5 +19,6 @@ declare const cliArgvUtil: { run(packageJson: { [key: string]: unknown; }, posix: string): Buffer; + readFiles(folder: string): string[]; }; export { cliArgvUtil }; diff --git a/dist/cli-argv-util.js b/dist/cli-argv-util.js index 216b29d..19d4893 100644 --- a/dist/cli-argv-util.js +++ b/dist/cli-argv-util.js @@ -1,6 +1,8 @@ -//! cli-argv-util v1.2.0 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License +//! cli-argv-util v1.2.1 ~~ https://github.com/center-key/cli-argv-util ~~ MIT License import { execSync } from 'node:child_process'; +import fs from 'fs'; +import slash from 'slash'; const cliArgvUtil = { parse(validFlags) { const toCamel = (token) => token.replace(/-./g, char => char[1].toUpperCase()); @@ -27,5 +29,8 @@ const cliArgvUtil = { const command = process.platform === 'win32' ? posix.replaceAll('\\ ', '" "') : posix; return execSync(command.replace(name, 'node bin/cli.js'), { stdio: 'inherit' }); }, + readFiles(folder) { + return fs.readdirSync(folder, { recursive: true }).map(file => slash(String(file))).sort(); + }, }; export { cliArgvUtil }; diff --git a/package.json b/package.json index fb44ecd..5879ea8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cli-argv-util", - "version": "1.2.0", + "version": "1.2.1", "description": "Simple utility to parse command line parameters and flags (arguments vector)", "license": "MIT", "type": "module",