-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: recursive copying with --up #89
base: main
Are you sure you want to change the base?
Conversation
needed for sindresorhus/cpy-cli#33 |
index.d.ts
Outdated
|
||
@default 0 | ||
*/ | ||
readonly up?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a good option name. Maybe trimPathComponents
or something.
index.js
Outdated
if ((path.normalize(source).split(path.sep).length - 1) < up) { | ||
throw new Error('cant go up that far'); | ||
} | ||
return path.join(path.normalize(source).split(path.sep).slice(up)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use tab-indentation.
index.js
Outdated
if (!up) { | ||
return source; | ||
} | ||
if (up === true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is not documented.
This will need tests. |
Note that things have changed since you started this: https://github.com/sindresorhus/cpy/releases/tag/v9.0.0 |
Note that things have changed since you started this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sindresorhus please see changes commited
Sorry, been a bit busy. Gonna check em out and jump on it, thanks @sindresorhus Edit: changes commited! Thanks for your patience. |
``` | ||
|
||
Where the destination paths of `*.js` files within subdirectories of the `src` directory | ||
will be flattened to a reduced structure another `destination/flatSourceFiles` path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't hard-wrap.
This is missing from index.d.ts
And I think it needs a rewrite. I don't really understand what it's trying to say.
No description provided.