Skip to content

Commit

Permalink
Release v1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Aug 16, 2023
1 parent 0c28e38 commit 4893fdc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand Down
3 changes: 2 additions & 1 deletion dist/cli-argv-util.d.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -19,5 +19,6 @@ declare const cliArgvUtil: {
run(packageJson: {
[key: string]: unknown;
}, posix: string): Buffer;
readFiles(folder: string): string[];
};
export { cliArgvUtil };
7 changes: 6 additions & 1 deletion dist/cli-argv-util.js
Original file line number Diff line number Diff line change
@@ -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());
Expand All @@ -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 };
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 4893fdc

Please sign in to comment.