Skip to content

dusk-network/duskit

Duskit

Duskit CI NPM version NPM version NPM version NPM version NPM version NPM version NPM version NPM version NPM version NPM version NPM version NPM version NPM version NPM version

Duskit (Dusk Kit) contains Svelte components and JS utilities that can help you quickly build a Dusk web app.

TOC

Dev environment

The dev environment assumes that you have at least Node.js v22.15.0 installed. The LTS version is 22.15.0 at the time of writing.

Duskit is a monorepo managed with npm workspaces and Turbo.

Installing dependencies

Run npm install from the root folder to get the necessary dependencies for all packages in the monorepo.

All additional dependencies must be installed with the --save-exact flag.

To install an additional dependency for all packages in the monorepo use the --workspaces flag. Example for a fictional dev dependency called "foo-bar":

npm install foo-bar --save-dev --save-exact --workspaces

To install the same additional dependency for a single package, like the http one for example:

npm install foo-bar --save-dev --save-exact --workspace=packages/http

Alternatively you can move to a package root and install the dependency from there as usual. npm is smart enough to understand that the package is a workspace in a monorepo.

[back to TOC]

Packages

[back to TOC]

NPM scripts

All terminal commands listed here assume that you are positioned in root folder of the repository. Commands executed from the root folder take advantage of Turbo's caching. To run a command skipping the cache read (not the writing), add the --force flag. For example for the checks task:

npm run checks -- --force

The following commands act on all packages in the monorepo, where applicable. If you want instead to run a command for a single package you can add a filter:

npm test -- --filter http

This executes tests only for the @duskit/http package.

Alternatively you can move to the package's folder and run the appropriate command from there. Refer to the package's README to see which commands are available.

N.B. the changeset, release and version-packages scripts are commands related to the whole monorepo and cannot be run from a single package.

  • npm run build - runs all build tasks (tokens + Storybook)
  • npm run build:storybook - builds a static Storybook into apps/storybook/storybook-static
  • npm run build:tokens - builds the design tokens
  • npm run changeset - shows an interactive shell to create a new changeset entry
  • npm run checks - runs all health checks (formatting, linting, type checking, tests)
  • npm run clean - runs the clean script for all packages (currently removes all coverage, docs and node_modules folders)
  • npm run docs - generates HTML documentation for all @duskit in the docs folder
  • npm run dev - runs the dev tasks (including Storybook)
  • npm run dev:storybook - runs Storybook only
  • npm run format - fixes the formatting in all files
  • npm run format:check - performs the formatting check
  • npm run lint - performs the linting check
  • npm run lint:fix - fixes, where possible, linting errors
  • npm run release - publishes a new release
  • npm run test - runs the test suite
  • npm run test:coverage - runs the test suite and generates the code coverage report in the coverage folder of each package
  • npm run test:watch - runs the test suite in watch mode
  • npm run typecheck - runs the type checker
  • npm run typecheck:watch - runs the type checker in watch mode
  • npm run version - updates versions and dependencies of packages and creates the changelogs

[back to TOC]

About

Duskit is a library of packages for building Dusk web apps 🧱

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors