Duskit (Dusk Kit) contains Svelte components and JS utilities that can help you quickly build a Dusk web app.
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.
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 --workspacesTo 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/httpAlternatively 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.
- @duskit/array
- @duskit/components
- @duskit/css
- @duskit/date
- @duskit/encoding
- @duskit/error
- @duskit/http
- @duskit/icons
- @duskit/math
- @duskit/promise
- @duskit/string
- @duskit/svelte-actions
- @duskit/svelte-stores
- @duskit/test-helpers
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 -- --forceThe 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 httpThis 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 intoapps/storybook/storybook-staticnpm run build:tokens- builds the design tokensnpm run changeset- shows an interactive shell to create a new changeset entrynpm run checks- runs all health checks (formatting, linting, type checking, tests)npm run clean- runs thecleanscript for all packages (currently removes allcoverage,docsandnode_modulesfolders)npm run docs- generates HTML documentation for all@duskitin thedocsfoldernpm run dev- runs the dev tasks (including Storybook)npm run dev:storybook- runs Storybook onlynpm run format- fixes the formatting in all filesnpm run format:check- performs the formatting checknpm run lint- performs the linting checknpm run lint:fix- fixes, where possible, linting errorsnpm run release- publishes a new releasenpm run test- runs the test suitenpm run test:coverage- runs the test suite and generates the code coverage report in thecoveragefolder of each packagenpm run test:watch- runs the test suite in watch modenpm run typecheck- runs the type checkernpm run typecheck:watch- runs the type checker in watch modenpm run version- updates versions and dependencies of packages and creates the changelogs