Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 3.22 KB

CONTRIBUTING.md

File metadata and controls

52 lines (42 loc) · 3.22 KB

How to contribute

Tools

The project uses a set of tools that should help developing stable and maintainable software. This tools are configured so that they can be used on your locale machine.

Tool Configuration Website
Babel babel.config.js https://babeljs.io
Webpack webpack.config.js https://webpack.js.org/
Jest jest.config.js https://jestjs.io/
JSDoc jsdoc.config.js http://usejsdoc.org/
ESlint .eslintrc.json https://eslint.org/
Lerna lerna.json https://lerna.js.org/

CI/CD Tools

Furthermore there are tools that are running online that should help out with different things.

Used as an automated build pipeline and configured in .travis.yml.

Keeps track of the code coverage in the project. The data shown is provided by the corresponding Travis CI step.

Automatically tests dependency updates inside the valid version range based on package.json and creates GitHub issues if any errors occur.

Commit messages and Versioning

We use conventional commits to highlight the intend of a certain commit. Be sure to follow the convention when contributing to the repo. To make this easy, we activated linting of commit messages. So be sure to check your commit message, if committing fails.

Deploy a new version

Only the maintainers of the repo can deploy a new version. Versions are automatically deployed when changes are pushed to the master branch. This triggers travis to run and deploy a new version to npm, a GitHub release and Git Tags. The actual semver to use is determined by looking at the commit messages.

Useful commands

  • $> yarn build - creates a production build
  • $> yarn start - starts webpack in watch mode. Automatically recompiles when changes in the source are detected.
  • $> yarn test - runs the unit tests.
  • $> yarn test:watch - starts jest in watch mode. Runs the affected unit tests when changes in the source are detected.
  • $> yarn test:coverage - runs the unit tests and reports the code coverage in the console window and in coverage/lcov-report/index.html
  • $> yarn lint - manually runs the linter

Recommended development setup

  1. Prepare your local devtools.
  2. Create a GitHub account and get assigned to the environment-agency-austria organization by @thomas-eaa
  3. Clone the repo locally by running git clone https://github.com/environment-agency-austria/webgis4u.git
  4. Install the recommended Visual Studio Code plugins (eslint, gitflow, GitLens)
  5. Install dependencies via yarn (without parameters)
  6. Edit code, run tests, build, ...