Skip to content

t10d/kingdom-node-sdk-core

Repository files navigation

🏰 Kingdom SDK: Core module

Core module to design DDD applications in TypeScript.

Features

See the changelog to know all the features supported.

Installation

Use the package manager npm to install @kingdom-sdk/core.

npm install @kingdom-sdk/core

You can use yarn as well.

yarn add @kingdom-sdk/core

Development Dependencies

  • TypeScript: Add support to static typing.
  • TS node: TypeScript interactive shell (REPL).
  • TS config paths: Simplify imports using an custom "@".
  • ESLint: Style and code enforcement.
  • Prettier: Style enforcement.
  • Babel: JS compiler.
  • Husky: Git hooks utility (pre-commit).
  • Lint staged: Run style check only for staged files (pre-commit).
  • Jest: Testing framework.

Production Dependencies

Adding a Git hook

After installing the dependencies, automatically the script prepare will set up the husky to git hooks.

To add a script to be run before every commit (such as code enforcement), follow the example below or edit by hand the pre-commit file.

yarn husky add .husky/pre-commit "yarn lint-staged"

REPL

You can test sorts of TypeScript code interactively through the ts-node executable:

yarn ts-node

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT