-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Samet Tarim edited this page May 5, 2023
·
1 revision
First for the understanding of the generator. This generator is an npm
node_modules package. The installation only takes 2 minutes.
After the package has been installed and is now available. Can we now with yo
this is yeoman we can call up the package and create our project in seconds with entries.
? 'Allo prod3v3loper,! What would you like to do? (Use arrow keys)
Run a generator
> webpack-preact
- We can, for example, specify which customer. Only used as an example here, as already mentioned, it could also be a project name.
- Then a year, which only serves as an example, it could also be something else, for example a sub-project.
- Then another folder, for example as a frontend (backend with composer follows)
- Import components straight away. At the moment there are only examples but more will follow.
- Automatically install existing npm packages in the package after the project structure has been created. Also for a quick installation to start.
? Customer name? (customer)
? Project year? (2023)
? Project name? (newsletter)
? Components you want to use? (type comma seperated) (counter)
? Want you install all dependencies? Y/n
After answering all questions, start the create process.
create src/index.tsx
create src/scss/style.scss
create public/index.html
create package.json
create global.config.json
create tsconfig.json
create webpack.config.js
create webpack.dev.js
create webpack.pro.js
create src/components/counter/actions.js
create src/components/counter/counter.js
create src/components/counter/store.js
The following structure is created after the prompt input. With the typed data.
Projects
|
βββ customer/ (prompt: project name)
| βββ year/ (prompt: 2023)
| βββ project/ (prompt: newsletter)
| βββ public/
| βββ index.html
| βββ src/
| βββ scss/
| | βββ style.scss
| βββ index.tsx
| βββ components/ (prompt: type comma seperated)
| βββ counter/
| βββ actions.js
| βββ counter.js
| βββ store.js
|
βββ another-customer/
| βββ 2018/
| | βββ project1/
| | βββ ...
| βββ 2022/
| | βββ project1/
| | βββ ...
| | βββ project2/
| | βββ ...
| βββ 2023/
| βββ project1/
| βββ ...
| βββ project2/
| βββ public/
| βββ index.html
| βββ src/
| βββ scss/
| | βββ style.scss
| βββ index.tsx
| βββ components/ (prompt: type comma seperated)
| βββ counter/
| βββ actions.js
| βββ counter.js
| βββ store.js