To install the create-snippet
package, run the command:
npm i -D create-snippet
npx create-snippet --help or -h
will show hintsnpx create-snippet --init or -i
initializes the projectnpx create-snippet --generate or -g
generates a new snippetnpx create-snippet --clear-cache or -cc
clear cache
When creating a new snippet, create a directory inside the directory .create-snippet with an arbitrary name, create the required number of files and directories inside this directory.
The strings snippetName
specified inside the file or in the file name
will be converted to a custom string when generating a new snippet.
The strings prefixName
specified inside the file when generating a new
snippet will be converted to custom strings.
The strings suffixName
specified inside the file when generating a new
snippet will be converted to custom strings.
camelCase
PascalCase
lower_snake_case
UPPER_SNAKE_CASE
lower-kebab-case
UPPER-KEBAB-CASE
- snippet - any string
- name - any string in the format
lower-kebab-case
- path - any string
- prefix - any string in the format
lower-kebab-case
- suffix - any string in the format
lower-kebab-case