@delement/configs
v1.1.0
Published
Useful front-end configs pack from Digital Element
Maintainers
Readme
Frontend Configs from Digital Element
A set of configs for TypeScript, Webpack, PostCSS, SVGO. Also includes browser polyfills for testing enviroment. Tree-shakable and ESM-only.
Example of usage
TypeScript config (exported by default)
In tsconfig.json file:
{
"extends": "@delement/configs"
}SVGO config
In svgo.config.mjs file:
// svgo.config.mjs
import config from "@delement/configs/svgo";
export default {
...config
};CommitLint config
In commitlint.config.ts file:
// commitlint.config.ts
import type { UserConfig } from "@commitlint/types";
import commitLintConfig from "@delement/configs/commitlint";
const Configuration: UserConfig = {
...commitLintConfig
};
export default Configuration;Polyfills
In your test file:
import Polyfills from "@delement/configs/polyfills";
new Polyfills([ "fetch", "TextEncoder", "TextDecoder" ]);
// your test code...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.
