Skip to content

Commit

Permalink
Release v0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Aug 12, 2023
1 parent 24629ef commit bd92fd0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.js linguist-detectable=false
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 v0.0.2 ~~ https://github.com/center-key/recursive-exec ~~ MIT License
//! recursive-exec v0.0.3 ~~ https://github.com/center-key/recursive-exec ~~ MIT License

export type Settings = {
extensions: string[] | null;
Expand Down
5 changes: 3 additions & 2 deletions dist/recursive-exec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! recursive-exec v0.0.2 ~~ https://github.com/center-key/recursive-exec ~~ MIT License
//! recursive-exec v0.0.3 ~~ https://github.com/center-key/recursive-exec ~~ MIT License

import { globSync } from 'glob';
import { spawnSync } from 'node:child_process';
Expand Down Expand Up @@ -31,7 +31,8 @@ const recursiveExec = {
log(logName, chalk.magenta(source));
const calcResult = (file) => {
const filename = file.substring(source.length + 1);
const relPath = file.substring(source.length + 1, file.length - path.basename(file).length - 1);
const endIndex = Math.max(source.length + 1, file.length - path.basename(file).length - 1);
const relPath = file.substring(source.length + 1, endIndex);
const basename = filename.substring(0, filename.length - path.extname(filename).length);
const interpolate = (template) => template
.replaceAll('{{basename}}', basename)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "recursive-exec",
"version": "0.0.2",
"version": "0.0.3",
"description": "Run a command on each file in a folder and its subfolders (CLI tool designed for use in npm scripts)",
"license": "MIT",
"type": "module",
Expand Down

0 comments on commit bd92fd0

Please sign in to comment.