The architect is a scaffolding aid that helps in the creation of various components used throughout a production application. The following outlines the procedures required in order to use these custom scaffolds.
yarn add @fomolol/architect- Update your
package.jsonwith the following. Point src to where files should be created. The script will reference your base directory automatically, though.
...
"directories": {
"src": "."
},
...
"scripts": {
...
"app": "architect -app ",
"component": "architect -c ",
"context": "architect -x ",
"api": "architect -api ",
"page": "architect -p ",
...
}- Use it like
yarn component MyNewComponentor like./node_modules/.bin/architect -c MyComponent
Scaffolding makes it easy to build consistent components that contain various dependencies i.e., Stories and tests for the application.
You can find all of the templates for the scaffolds inside of scaffolding. For example, scaffold-component/* files are connected via the file scaffold-component.js.
./node_modules/.bin/architect -app
./node_modules/.bin/architect -api
./node_modules/.bin/architect -c Test
./node_modules/.bin/architect -x Test
./node_modules/.bin/architect -p tests
./node_modules/.bin/architect -s MyStory
This set of hooks is curated and maintained by the FOMOLOL Classified team:
- Scott Shin (@shinmc_) – FOMOLOL
- Rob Sawyer (@robksawyer_) – FOMOLOL