Open source

Creating a separate GitHub repository

NOTE: While we prefer the mono-repo approach, you can also create a separate repository for your Fozzie package.

Naming your package

The general naming convention for a Fozzie package is to use f-{your-package-name} e.g. f-footer, f-header, f-vue-icons.

Create a new Fozzie GitHub repository

To create a new repository go to the new repository page and set the owner to the justeat org, visiblity to private, initialise with a README, and add a Node .gitignore & Apache-2.0 license.

Create a new repository on GitHub

Access settings

Configure the access settings in Settings -> Collaborators & teams giving the UI Admins team "admin" permissions, and the UI Developers team "write" permissions.

GitHub repository access settings

Configure master branch protection

Configure branch protection in Settings -> Branches selecting the master branch from the dropdown in the "Protected branches" section.

The minimum recommended settings to select are

* [x] Protect this branch
  * [x] Require pull request reviews before merging
    * [x] Dismiss stale pull request approvals when new commits are pushed
    * [x] Require review from Code Owners
  * [x] Require status checks to pass before merging
    * [x] Require branches to be up to date before merging

Status checks

If/once you have any services set up with status checks then you'll be able to select them in the "Require status checks to pass before merging" section in order to require the checks to pass before a pull request can be merged.

Publishing to npm

To publish a package to npm, please first ensure that you have registered an account. You may use an existing public account, but many Just Eat employees prefer to set up a new Just Eat-specific account.

Internal contributors (Just Eat employees) can request to be added to the Just Eat npm org by asking in the #guild-ui Slack channel and providing your npm account details. External contributors should raise a pull request and the release will be handled for you once approved

Once you are happy that the package is ready to be published to the npm registry, ensure you are on the correct branch — typically the master branch with the latest changes pulled — then run npm publish on the command line.

Problems

Have a look at the module issues page for common issues and how to resolve them.