Useful front-end configs pack from Digital Element
tsconfig.json file:
json
{
"extends": "@delement/configs"
}
`
$3
In svgo.config.mjs file:
`ts
// svgo.config.mjs
import config from "@delement/configs/svgo";
export default {
...config
};
`
$3
In commitlint.config.ts file:
`ts
// commitlint.config.ts
import type { UserConfig } from "@commitlint/types";
import commitLintConfig from "@delement/configs/commitlint";
const Configuration: UserConfig = {
...commitLintConfig
};
export default Configuration;
`
$3
In jest.config.ts file:
`ts
// jest.config.ts
import defaults from "@delement/configs/jest";
import type { Config } from "jest";
const config: Config = {
...defaults,
setupFiles: [ // optional
"/tests.setup.ts",
]
};
export default config;
`
#### Polyfills for Jest setup (optional)
In tests.setup.ts file:
`ts
// tests.setup.ts
import Polyfills from "@delement/configs/polyfills";
new Polyfills([ "fetch", "TextEncoder", "TextDecoder" ]);
// your setup...
`
___
For developers
If you want to contribute new features or need some changes, please open the src folder, run npm install, make your changes, and build the library with Rollup using npm run build`.