0.0.2 • Published 5 years ago
pseudopia v0.0.2
Parse pseudo React into a scaffolded app.
Example
Pseudo code:
<Layout>
<Header />
<Wrapper>
<MainContent
title="Pseudopia"
subTitle="A delightful React app generator"
/>
</Wrapper>
<Footer />
</Layout>
Generates:
./output/
├── App.tsx
└── components
├── Footer.tsx
├── Header.tsx
├── Layout.tsx
├── MainContent.tsx
├── Wrapper.tsx
└── __tests__
├── Footer.test.tsx
├── Header.test.tsx
├── Layout.test.tsx
├── MainContent.test.tsx
└── Wrapper.test.tsx
Getting Started
- Run
npm i
- Fill out the
pseudoCode.js
file with your app idea - Run
npm start
You should now see an output
directory with a scaffolded app.
Flags
Naming
Name | Options | Default |
---|---|---|
--baseComponentName | string | App |
--componentDirName | string | components |
--extension | js , jsx or tsx | tsx |
Outputs
Name | Options | Default |
---|---|---|
--outputPath | string | ./output |
--unitTestOutputPath | string | ./output/components/__tests__ |
Templates
Name | Options | Default |
---|---|---|
--appTemplatePath | string | ./templates/app.hbs |
--componentTemplatePath | string | ./templates/component.hbs |
--unitTestTemplatePath | string | ./templates/unit-test.hbs |
Example
$ pseudopia myPseudo.js --baseComponentName Wrapper
Enjoy.