A monorepo containing Natura Design System multiplatform packages.
Make sure you have node
and yarn
installed
At the root directory run yarn install
The commands bellow can be run by:
yarn <command>
test
: runs packages tests
test:watch
: runs packages tests and watch for changes
lint
: runs eslint using the @naturacosmeticos/eslint-config-natura
rules
commit
: opens an interactive GUI to help you write commits in compliance with conventional commits
build
: run packages build task
release
: analize commits, bump packages and make the apropriate releases
prerelease
: analize commits, bump packages and make the apropriate pre-releases
start
: runs packages start
task, generally used to open a browser visualization
create a new folder inside the packages
folder and run
yarn init
and fill the package information.
After that, create in the package's package.json
file the above scripts.
This enable us to run all packages commands from the root folder.
Add the created package in the root package.json
workspaces array
{
"workspaces": [
"packages/natds-themes",
"packages/<your-new-package>"
]
}
from the root folder
npx lerna add <package-I-want-to-add> --scope @naturacosmeticos/<my-package> -D
from the root folder (devDependencies only. if it is a dependency, it should be added and listed in the packages package.json
with the above command)
yarn add <package-I-want-to-add> -D -W
We are using the conventional commits
guidelines to automate our versioning and changelog criation process.
You can read more about here.
If you are unsure about how to follow the commit guidelines, we have an interective guide to help you with this. See the commit
command above.
All the commits have to contain an issue number starting with
DSY-
. If you are having trouble commiting (reference error) you probably forgot that! Using thecommit
command, you can include this information on the long description field