Hi! We're really excited that you are interested in contributing to Antwerp UI. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
- If you're not yet a member of our DigAnt Café slack community, you can easily join here.
- Use the #antwerp-ui channel on slack to ask questions about using Antwerp UI.
- Use the #antwerp-ui-ngx channel on slack to discuss changes to the Antwerp UI code itself.
- Use [GitHub Issues][github-issues] to report bugs, request features, ask policy questions or propose policy changes.
Note: policy questions are about the way Antwerp UI is developed and released, or about its architecture. We use github issues to have a public archive of these discussions.
Maintainers: check the issue handling guidelines for how to handle reported issues.
-
The
master
branch is where we ship releases from. Always send PRs tomaster
. -
Commit your changes to a topic branch with a name matching these examples:
feature/more-cowbell
fix/broken-cowbell
docs/document-cowbell
- For a list of suggested keywords, check the commit message convention.
-
Work in the
packages
folder and DO NOT check in the top-leveldist
folder in the commits. -
Commits must follow the commit message convention. It's OK to have multiple small commits as you work on the PR - we can let GitHub automatically squash it before merging.
-
Make sure
npm test
passes. -
If adding a new feature:
- Add an accompanying test case.
- Provide a convincing reason to add this feature. Ideally you should open a feature request issue first and have it greenlighted before working on it.
-
If fixing a bug:
- Provide a detailed description of the bug in the PR or an accompanying bug report issue linked from the PR (recommended).
- Add appropriate test coverage if applicable.
You will need Node.js version 12+.
After cloning the repo, run:
npm install
npm run build:all
npm start
The Antwerp UI components are based on an Angular 8 environment. Every package is a standard Angular library, scoped under @acpaas-ui
.
To build or test packages independently, run:
ng build ngx-<packagename>
ng test ngx-<packagename>
For example:
ng build ngx-utils
ng test ngx-utils
To build all packages, run:
npm run build:all
Further documentation about the libraries setup can be found in the Angular Guide
Additionally to running this project locally, the repository also offers you the option to develop using Docker containers. To start your service, execute:
docker-compose build
docker-compose up -d
When the service is up, use following commands to execute bash inside your container:
docker ps
docker exec -it ${YOUR_CONTAINER_ID} sh
From there you can run all necessary npm commands for development.
Packages are essentially Angular libraries that follow Angular standard. More info on how to create Angular libraries can be found here.
To create a new library as part of Antwerp UI, run:
ng generate library ngx-<package>
To build and test your package, respectively run:
ng build ngx-<package>
ng test ngx-<package>
Make sure to edit the following files to set correct publishing settings:
- Add your package to
paths
intsconfig.json
- Change
dest
inpackages/<your-component>/ng-package.json
to./dist
- Update the contents of
tslint.json
conform the other AUI packages - Change
name
andversion
inpackages/<your-component>/package.json
and addpublishConfig
with{ "access": "public" }
- Add
customLaunchers
and change thebrowsers
andsingleRun
properties inpackages/<your-component>/karma.conf.js
Once your library is created, you may import the library module in the packages/styleguide/src/aui/aui.module.ts
.
After this, add a demo page component to the examples module: packages/styleguide/src/examples/pages
.
packages/aui-<package>
: Antwerp UI package/librarypackages/styleguide
: Angular application featuring demo's of the packagessrc/aui/aui.module.ts
: Shared module that imports/exports all needed Antwerp UI packages for demo purposessrc/examples
: Example module containing pages and routes for the demos.
To publish a new version of Antwerp UI, run:
npm run publish:all
Internally, this will use Lerna to publish all the Angular packages. Note that you'll need the appropriate access to publish.
Antwerp UI is released at least once a month, and more often if there are high priority changes. If your PR has been merged but not yet released, and it is high priority, please ping the #antwerp-ui-ngx channel to ask for an out-of-band release.
The project follows Semantic Versioning. The latest stable major version is developed on the master
branch. For other major versions there are separate vX-dev
branches. For more info on the exact versioning policy, see the versioning guide.
A changelog is provided for your convenience.
Maintainers: see the release guide for guidance on releases and versioning.