You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/CUSTOM-TEMPLATES.md
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,17 @@
2
2
3
3
With this library you can create your own templates and use them to generate your components in a second!
4
4
5
+
`create-component-app` offers 4 replacement keys which can be used in the names of the files in your template, as well as within the templates themselves. Each key corresponds to a formatted transformation of the component name that you enter when running `create-component-app`.
6
+
7
+
#### Keys and Replacements
8
+
Replacement Key | Description
9
+
--- | ---
10
+
`COMPONENT_NAME` | Each instance of the string is replaced with the component name that you entered without modification. This is the standard behavior. (eg: `MyComponent` => `MyComponent` and replaces all instances of `COMPONENT_NAME` in files and file names.)
11
+
`COMPONENT_CAP_NAME` | Each instance of the string is replaced with an uppercased transformation of the component name that you entered. (eg: `MyComponent` => `MYCOMPONENTNAME` and replaces all instances of `COMPONENT_CAP_NAME` in files and file names.)
12
+
`component_name` | Each instance of the string is replaced with a lowercased transformation of the component name that you entered. (eg: `MyComponent` => `mycomponentname` and replaces all instances of `component_name` in files and file names.)
13
+
`cOMPONENT_NAME` | Each instance of the string is replaced with a lower camel case transformation of the component name that you entered. For clarity, the first letter is simply lowercased. (eg: `MyComponent` => `myComponent` and replaces all instances of `cOMPONENT_NAME` in files and file names.)
14
+
15
+
5
16
### 1) Create your custom template folder
6
17
7
18
Create a folder to contain all your custom templates.
0 commit comments