File tree Expand file tree Collapse file tree 4 files changed +15
-15
lines changed
Expand file tree Collapse file tree 4 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ Parameters:
2828
2929Example ** package.json** scripts:
3030``` json
31- "scripts" : {
32- "minimize-js" : " recursive-exec build/web --ext=.js 'uglifyjs {{file}} --output dist/web/{{basename}}.min.js'"
33- },
31+ "scripts" : {
32+ "minimize-js" : " recursive-exec build/web --ext=.js 'uglifyjs {{file}} --output dist/web/{{basename}}.min.js'"
33+ },
3434```
3535
3636The command template supports 6 variables:
@@ -45,18 +45,18 @@ The command template supports 6 variables:
4545
4646
4747### 2. Command macros
48- For reusability and improved readability, commands should be defined as macros in your project's ** package.json** file.
48+ For reusability and readability, best practice is to define commands as macros in your project's ** package.json** file.
4949
5050Example ** package.json** scripts:
5151``` json
52- "recursiveExecConfig" : {
53- "commands" : {
54- "make-min-file" : " uglifyjs {{file}} --output dist/web/{{basename}}.min.js"
55- }
56- },
57- "scripts" : {
58- "minimize-js" : " recursive-exec build/web --ext=.js {{command:make-min-file}}"
59- },
52+ "recursiveExecConfig" : {
53+ "commands" : {
54+ "make-min-file" : " uglifyjs {{file}} --output dist/web/{{basename}}.min.js"
55+ }
56+ },
57+ "scripts" : {
58+ "minimize-js" : " recursive-exec build/web --ext=.js {{command:make-min-file}}"
59+ },
6060```
6161
6262### 3. Command-line npx
Original file line number Diff line number Diff line change 1- //! recursive-exec v1.0.4 ~~ https://github.com/center-key/recursive-exec ~~ MIT License
1+ //! recursive-exec v1.1.0 ~~ https://github.com/center-key/recursive-exec ~~ MIT License
22
33export type Settings = {
44 echo : boolean ;
Original file line number Diff line number Diff line change 1- //! recursive-exec v1.0.4 ~~ https://github.com/center-key/recursive-exec ~~ MIT License
1+ //! recursive-exec v1.1.0 ~~ https://github.com/center-key/recursive-exec ~~ MIT License
22
33import { globSync } from 'glob' ;
44import { spawnSync } from 'node:child_process' ;
Original file line number Diff line number Diff line change 11{
22 "name" : " recursive-exec" ,
3- "version" : " 1.0.4 " ,
3+ "version" : " 1.1.0 " ,
44 "description" : " Run a command on each file in a folder and its subfolders (CLI tool designed for use in npm package.json scripts)" ,
55 "license" : " MIT" ,
66 "type" : " module" ,
You can’t perform that action at this time.
0 commit comments