Closed xianghongai closed 3 years ago
Use this plugin: https://github.com/75lb/renamer-case...
How to use plugins: https://github.com/75lb/renamer/wiki/How-to-use-replace-chain-plugins
ERROR: plugin could not be found: renamer-case
Hi, yes I just spotted this issue myself - renamer
is not finding the globally-installed renamer-case plugin.. it should find it, I will fix that now.
In the meantime, please install the plugin package locally like this:
npm install --save-dev renamer-case
If renamer
is still installed globally, then run this to test the plugin loads (you will see the plugin is loaded because it shows in the usage guide. )
renamer --chain renamer-case --help
Rename files - don't forget --dry-run
first.
renamer --chain renamer-case --case kebab * --dry-run
Windows:
C:\nodejs\node_global\node_modules\renamer
execute the command npm install --save-dev renamer-case
;C:\nodejs\node_global\node_modules\renamer\examples
directory, and then renamer --chain renamer-case --case kebab **/*
;Nice! thank you, it helped me a lot.
Thanks, that's good news..
The issue with loading globally-installed plugins has been fixed and released in renamer v3.0.2. With the latest renamer version you will not get the "plugin could not be found" error you saw earlier.
Preset some naming schemes?
camel
:foo bar
→fooBar
pascal
:foo bar
→FooBar
constant
:foo bar
→FOO_BAR
dot
:foo bar
→foo.bar
kebab
:foo bar
→foo-bar
snake
:foo bar
→foo_bar
title
:foo bar
→Foo Bar
lower
:FOO BAR
→foo bar
upper
:foo bar
→FOO BAR