cactus-utils
Cactus Utilities monorepo
Table of contents
Packages
Package | Description |
---|---|
@cactus-technologies/node-application | Helper to manage PM2 App definitions and process states |
@cactus-technologies/errors | Errors module for Cactus Servers and Applications |
@cactus-technologies/logger | Customized Pino Logger for Cactus projects |
@cactus-technologies/slack-notifier | Slack Notifications Manager |
@cactus-technologies/api-request | Request helper |
@cactus-technologies/server | Basic Server for Cactus Webservices |
@cactus-technologies/utils | Utility functions for node base apps |
@cactus-technologies/uuid | A set of Unique ID generators for JS apps |
Getting started
First, ensure you have Node v10+ and yarn v1.0+ installed on your machine.
- Lerna manages inter-package dependencies in this monorepo.
- Builds are orchestrated via
lerna run
and NPM scripts. - Our documentation is generated from
JSDoc comments
,README.md
,example.js
files via CI.
Installation
git clone git@github.com:CactusTechnologies/cactus-utils.git cactus-utils
cd cactus-utils
npm install
Incorporating upstream changes
If you were previously in a working state and have just pulled new code from develop
:
- If there were package dependency changes, run
yarn
at the root.- This command is very quick if there are no new things to install.
- Run
yarn compile
to get the latest built versions of the library packages in this repo.- This command is quicker than
yarn verify
since it doesn't run tests
- This command is quicker than
Developing packages
Thanks for taking the time to care about the codebase!
- Create a new feature branch. We use a format like
[initials]/[feature]
:jp/refactor-api
. - Write some code.
🔨 - Ensure your code is tested??? and linted.
- Add unit tests as necessary when fixing bugs or adding features; run them with
yarn test
in the relevantpackages/
directory. (Wishfull thinking for the moment.) - Linting is best handled by your editor for real-time feedback.
- If you use VS Code the project will recommend you to install the appropriate extentions.
- Most lint errors can often be automatically fixed. Run lint fixes with
yarn fix
.
- Add unit tests as necessary when fixing bugs or adding features; run them with
- Submit a Pull Request.
- Team members will review your code and merge it after approvals.
- You may be asked to make modifications to code style or to fix bugs you may have not noticed.
-
Do not amend commits and
push --force
as they break the PR history. Please add more commits.
- Hooray, you helped!
🎩