Contribution

For more development details you may have a look at the confluence pages about development details.

Development principles

  1. Avoid including runtime dependencies as much as possible.
  2. Write integration tests with these advices.
  3. Re-use existing helper functions and helper classes to lower the build size.
  4. Use existing linting and code styles, based on configuration.
  5. Follow the existing structures for documentation, naming and structure.

Development environment and defaults

Many defaults are given by the linting and prettier configurations. But to keep the code base consistent and clean, we have set a certain set of rules:

Recommended Tools

How to contribute?

If you don't have commit access;

  • Create a Fork.
  • Make your changes in your Fork and create a Pull Request back to the Eufemia repo and origin/main.
  • Watch the result of the tests.

If you have commit access;

  • Make a new branch.
  • Make your changes and commit it to the repo.
  • Make a Pull Request to origin/main.
  • Watch the result of the tests.

How to create a local package

Run yarn build:pack inside /dnb-eufemia and you get this file: /build/dnb-eufemia-v0.0.0-development.

How to enable lint-staged?

Create a file called .env.local in the root of the repo (side-by-side to the .git folder), and put LINT_STAGED=1 inside:

# File: .env.local
LINT_STAGED=1

Other development topics