@@ -43,7 +43,7 @@ name, or other custom data) inside the paths or contents of the files using Hand
4343- [ Examples] ( #examples )
4444 - [ Run] ( #run )
4545 - [ Command Example] ( #command-example )
46- - [ Node Module Example] ( #node-module-example )
46+ - [ Equivalent Node Module Example] ( #equivalent- node-module-example )
4747 - [ Files] ( #files )
4848 - [ Input] ( #input )
4949 - [ Output] ( #output )
@@ -310,11 +310,11 @@ All of the above helpers (built in and custom) will also be available to you whe
310310simple-scaffold MyComponent \
311311 -t project/scaffold/** /* \
312312 -o src/components \
313- -d ' {"className": "myClassName"}'
313+ -d ' {"className": "myClassName","author": "Chen Asraf" }'
314314 MyComponent
315315```
316316
317- #### Node Module Example
317+ #### Equivalent Node Module Example
318318
319319``` typescript
320320import Scaffold from " simple-scaffold"
@@ -326,6 +326,7 @@ async function main() {
326326 output: [" src/components" ],
327327 data: {
328328 className: " myClassName" ,
329+ author: " Chen Asraf"
329330 },
330331 })
331332 console .log (" Done." )
@@ -336,57 +337,65 @@ async function main() {
336337
337338#### Input
338339
339- Input file path:
340+ - Input file path:
340341
341- ``` text
342- project → scaffold → {{Name}}.js → src → components
343- ```
344-
345- Input file contents:
342+ ``` text
343+ project → scaffold → {{Name}}.js → src → components
344+ ```
346345
347- ``` typescript
348- import React from ' react'
346+ - Input file contents:
349347
350- export default {{camelCase name }}: React .FC = (props ) => {
351- return (
352- < div className = " {{className}}" > {{camelCase name }} Component < / div >
353- )
354- }
355- ```
348+ ``` typescript
349+ /**
350+ * Author: {{ username }}
351+ * Date: {{ now "yyyy-MM-dd" }}
352+ */
353+ import React from ' react'
354+
355+ export default {{camelCase name }}: React .FC = (props ) => {
356+ return (
357+ < div className = " {{className}}" > {{camelCase name }} Component < / div >
358+ )
359+ }
360+ ```
356361
357362#### Output
358363
359- Output file path:
360-
361- - With ` createSubFolder = false ` (default):
364+ - Output file path:
362365
363- ``` text
364- project → src → components → MyComponent.js
365- ```
366+ - With ` createSubFolder = false ` (default):
366367
367- - With ` createSubFolder = true ` :
368+ ``` text
369+ project → src → components → MyComponent.js
370+ ```
368371
369- ``` text
370- project → src → components → MyComponent → MyComponent.js
371- ```
372+ - With `createSubFolder = true`:
372373
373- - With ` createSubFolder = true ` and ` subFolderNameHelper = 'upperCase' ` :
374+ ```text
375+ project → src → components → MyComponent → MyComponent.js
376+ ```
374377
375- ``` text
376- project → src → components → MYCOMPONENT → MyComponent.js
377- ```
378+ - With `createSubFolder = true` and `subFolderNameHelper = 'upperCase'`:
378379
379- Output file contents:
380+ ```text
381+ project → src → components → MYCOMPONENT → MyComponent.js
382+ ```
380383
381- ``` typescript
382- import React from ' react'
384+ - Output file contents:
383385
384- export default MyComponent : React .FC = (props ) => {
385- return (
386- < div className = " myClassName" > MyComponent Component < / div >
387- )
388- }
389- ```
386+ ```typescript
387+ /**
388+ * Author: Chen Asraf
389+ * Date: 2022-01-01
390+ */
391+ import React from 'react'
392+
393+ export default MyComponent: React.FC = (props) => {
394+ return (
395+ <div className="myClassName">MyComponent Component</div>
396+ )
397+ }
398+ ```
390399
391400## Contributing
392401
0 commit comments