The package contains the minimum starting point, of what defines a package for us.
-
This directory should be copied and renamed to the package name. The
"name"
field in thepackage.json
should be updated to match the directory name, prefixed by@velocitycareerlabs
as seen by thetemplate-package
name:"@velocitycareerlabs/template-package"
-
A description should be added in the
"description"
field in thepackage.json
-
This
README.md
should be cleared and used for relevant information in the new package.
-
"repository"
field inpackage.json
is important and is used later when we setup scopes withlerna
-
They packages actually get published, but we don't consume the packages directly from their publish location, instead we rely on
lerna
cli within the repository like so:lerna add [CONSUMED-PACKAGE-NAME] --scope [CONSUMING-PACKAGE-NAME]
So if you want
did-docs
package to use thecrypto
package, you would do:lerna add @velocitycareerlabs/crypto --scope @velocitycareerlabs/did-docs
-
Packages uses standard structure, of
src
directory, and thentest
directory for corresponding tests -
Tests can be run from
package.json
script -
Tests will be automatically included in global test suite and run in CI