Welcome to the shared configuration repository for BIIP projects. This README will guide you on how to use the shared configuration effectively in your projects.
Using the shared Prettier configuration is straightforward and helps maintain consistent code formatting across BĮIP projects.
-
Install the Package
To get started, you need to install the
@aplinkosministerija/biip-prettier-config
package, which exports a Prettier configuration object. You can do this usingyarn
:yarn add --dev @aplinkosministerija/biip-prettier-config
-
Reference the Configuration in
package.json
Once the package is installed, you should reference it in your project's
package.json
file. This ensures that your project uses the shared Prettier configuration:{ "name": "my-cool-application", "version": "1.0.0", "prettier": "@aplinkosministerija/biip-prettier-config" }
Now, your Prettier settings will align with the BĮIP shared configuration, making it easy to maintain consistent code formatting.
Pro-tip: After adding it to your project, reformat your entire codebase using the following command:
yarn prettier . --write
There are multiple ESLint shared configuration packages available for different project types:
@aplinkosministerija/eslint-config-biip-api
- for configuring ESLint for API projects.@aplinkosministerija/eslint-config-biip-react
- for configuring ESLint for React applications.
Follow these steps to incorporate the shared ESLint configuration into your project:
-
Install the Package
To get started, you need to install the
@aplinkosministerija/eslint-config-biip
package, which exports a ESLint configuration object. You can do this usingyarn
:yarn add --dev @aplinkosministerija/eslint-config-biip-api
-
Reference the Configuration in
package.json
Once the package is installed, you should reference it in your project's
package.json
file. This ensures that your project uses the shared ESLint configuration:{ "name": "my-cool-application", "version": "1.0.0", "eslintConfig": { "extends": "@aplinkosministerija/eslint-config-biip-api" } }
Now, your ESLint settings will align with the BIIP shared configuration, making it easy to maintain consistent code quality and formatting. .
Pro-tip: After adding it to your project, auto-fix your entire codebase using the following command:
yarn lint --fix
The BĮIP team uses a customized Docker image for Caddy, which includes additional plugins. See here for more information on how to use it.
Here are the steps to create a new package release:
-
Execute the
packages:changeset
CommandRun the following command on your local computer to generate a changeset:
yarn packages:changeset
This command will create a changeset for your package's changes.
-
Push the Changeset
After running the
packages:changeset
command, you'll see changes in your project. Push these changes, including the changeset file, to the repository. This step is essential to trigger the release process.After this push, a pull request will be automatically generated in the
main
branch. -
Merge the Pull Request
Once the pull request is reviewed and approved, you can merge it into the
main
branch. Upon merging, the packages will be automatically pushed, and your changes will be released.
By following these steps, you can ensure that your BĮIP package releases are well-organized and consistent.
In order to publish BĮIP customized Caddy docker image:
-
Go to
Publish: Caddy docker iamge
workflow GitHub action; -
Enter image tag with Caddy version that you like to push e.g.
2.7.5
and run workflow. -
New BĮIP customized Caddy docker image will be pushed.