ui
DirectoryThe ui
directory contains the pages and public assets of a NextJs project. NextJs is an all-in-one framework to develop, preview and deploy UI using react. SOMOD adds reusability and sharing features to NextJs.
project-root | +-- node_modules --+ | +-- module-a | | +-- build/ | | +--ui/ | FROM DEPENDENCIES | +-- pages/ | | +-- pages-data/ | | +-- public/ | | +-- config.json --+ | | +-- build/ --+ | +-- ui/ | | +-- pages/ | BUILD OUTPUT | +-- pages-data/ | | +-- public/ | | +-- config.json --+ | +-- ui/ --+ | +-- pages/ | | +-- pages-data/ | SOURCE | +-- public/ | | +-- config.yaml --+ | +-- pages/ --+ +-- public/ | PREPARED +-- .env | +-- next.config.js --+
The ui
directory has four optional children
pages
.tsx
extension.pages-data
public
config.yaml
SOMOD build command compiles typescript in ui/pages
and ui/pages-data
to produce javascript and type definitions under build/ui/pages
and build/ui/pages-data
respectively.
The build command copies the files in ui/public
to build/ui/public
.
ui/config.yaml
is validated and converted into build/ui/config.json
during the build.
SOMOD prepare command generates pages
, public
, .env
, and next.config.js
by combining all dependency modules.
The namespace helps to resolve the conflicts when there is a page with the same name that exists in more than one dependency module.
In the next section, let's explore the structure of config.yaml.
Write an email to opensource@sodaru.com