element-web/knip.ts
Michael Telatynski f326814895
Use nx for running dev tasks (#32476)
* Use nx for running dev tasks

Initially only build & start
This enables caching, i.e. if you made no changes to shared-components then it can skip that build and speed up your iteration cycle time

nx will also be used for our release tooling down the line

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Drop `concurrently` - we no longer use it

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Make knip happier

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Also use nx tasks for jest & tsc

so that SC gets built as needed

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add missing @nx/jest plugin

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix prebuild:rethemendex for Windows

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix prebuild:rethemendex for Windows

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add prepack script to package.json

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2026-02-12 15:19:59 +00:00

70 lines
2.2 KiB
TypeScript

import { KnipConfig } from "knip";
export default {
workspaces: {
"packages/shared-components": {
entry: ["src/index.ts"],
},
".": {
entry: [
"src/serviceworker/index.ts",
"src/workers/*.worker.ts",
"src/utils/exportUtils/exportJS.js",
"src/vector/localstorage-fix.ts",
"scripts/**",
"playwright/**",
"test/**",
"res/decoder-ring/**",
"res/jitsi_external_api.min.js",
"docs/**",
],
ignore: [
// Keep for now
"src/hooks/useLocalStorageState.ts",
"src/hooks/useTimeout.ts",
"src/components/views/elements/InfoTooltip.tsx",
"src/components/views/elements/StyledCheckbox.tsx",
"packages/**/*",
],
},
},
ignoreBinaries: ["test:storybook", "test:unit", "build:storybook"],
ignoreDependencies: [
// Required for `action-validator`
"@action-validator/*",
// Used for git pre-commit hooks
"husky",
// Used by jest
"babel-jest",
// Used by babel
"@babel/runtime",
"@babel/plugin-transform-class-properties",
// Referenced in PCSS
"github-markdown-css",
// False positive
"sw.js",
// Used by webpack
"process",
"util",
// Embedded into webapp
"@element-hq/element-call-embedded",
// Transitive dep of jest
"vitest-environment-jest-fixed-jsdom",
// We import this in some tests, transitive dep of @playwright/test
"playwright-core",
// Used by matrix-js-sdk, which means we have to include them as a
// dependency so that // we can run `tsc` (since we import the typescript
// source of js-sdk, rather than the transpiled and annotated JS like you
// would with a normal library).
"@types/content-type",
"@types/sdp-transform",
],
ignoreExportsUsedInFile: true,
nx: {
config: ["nx.json", "project.json", "{apps,packages,modules}/**/project.json", "package.json"],
},
} satisfies KnipConfig;