Open bl5ck opened 5 years ago
It should copy everything if you choose to replicate SignUp
. Isn't it working for you?
Ah, my bad wasn't detailed about it.
It does copy everything, but it renamed only the SignUp
and skipped signUp
in file names and file content.
Got it. Just out of curiosity, why have you named it signUp.styles.js
, and not SignUp.styles.js
?
Regardless, this doesn't seem to be a common structure. And I'm afraid that it could lead to false positives. Are you aware of any article or something that recommends this architecture?
Actually, I decided it myself based on the willing to distinguish Component file and the others. So I didn't follow any architecture regarding that point.
I have a similar problem: My components folder has the following structure:
-/components
/my-component
index.tsx
(which exports the main component)MyComponent.tsx
(the component itself)MyComponent.d.tsx
(types for the component)/other-component
When running the generator, it offers me the double of the expected possible components to replicate from (I see both MyComponent
and MyComponent.d
as options — which I believe is wrong) and if I choose MyComponent
, for example I say I want it to be called Test
:
src/components/my-component
Test.tsx
component, inside /components
not creating a new folder and not creating the rest of the files...@antoniocapelo, did you find a solution to your problem?
I have a structure like:
/Boilerplate/Boilerplate.scss
/Boilerplate/Boilerplate.tsx
/Boilerplate/index.ts
but the tool only generates:
/Test.scss
/Test.tsx
My component folder have 5 files:
SignUp.js
andindex.js
(please correct me if I'm wrong, thanks).I checked the
getFiles
function insideutils.js
and saw that it could be tweaked a little bit to support detecting both capitalized and uncapitalized files. Any idea is highly appreciated.