1.0.0 • Published 5 years ago
@wooboo/cpas v1.0.0
cpas
Use your code as a template
Intro
If you've created your perfect component structure and you want it to be your template for the rest the cpas is for you.
Copies files and directory structure making replacements in file and directory names and in content.
Replacement is case preserving. It tries to preserve existing casing including UPPER and lower cased strings and also PascalCase, camelCase, snake_case and kebab-case
Usage
Install globally
npm install -g @wooboo/cpasRun - full usage
cpas ./components/my-component ./components --replace "my component/perfect button" --ignore lib --ignore bin --ignore *.logor in your dev dependencies
npm install @wooboo/cpas --save-devsetup npm script
"scripts": {
"gen:component": "cpas ./components/my-component --replace 'my component' --ignore lib --ignore bin --ignore *.log",
}npm run gen:componentIgnoring
Create .cpasignore file in your root directory with common files to ignore while processing.
CLI reference
$ cpas [source] [destination] <options>
[source], -s, --source source file or directory to copy
[destination], -d, --destination destination directory to copy
-r, --replace replace pattern (multiple)
<from>/<to> - replaces 'from' to 'to'
<from> - asks for 'to'
if ommited asks for replacement pattern
-i, --ignore file and directory ignores (multiple)