UNPKG

@kitschpatrol/mdat-config

Version:
3 lines (2 loc) 936 B
import e from"node:fs/promises";import{mergeConfig as t}from"mdat";const n={"shared-config":`## Project configuration This project uses [@kitschpatrol/shared-config](https://github.com/kitschpatrol/shared-config) to consolidate various linting and formatting tool configurations under a single dependency and the CLI command \`ksc\`. (ESLint, Prettier, CSpell, etc.)`};function r(e){return t(n,e??{})}let i;async function a(){if(!i){let e=await import(`mdat`);i={expandString:e.expandString,mergeConfig:e.mergeConfig}}return i}async function o(e,t){let{expandString:r,mergeConfig:i}=await a(),o=await r(e,t?i(n,t):n,{format:!0});return String(o)}async function s(t,r){let i=await e.readFile(t,`utf8`),{expandString:o,mergeConfig:s}=await a(),c=await o(i,r?s(n,r):n,{format:!0});await e.writeFile(t,String(c),`utf8`)}function c(){i=void 0}export{c as clearCache,n as default,n as sharedMdatConfig,o as fix,s as fixFile,r as mdatConfig};