mdat 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2,4 +2,4 @@ export { checkFiles, checkString, collapseFiles, collapseString, expandFiles, ex
2
2
  export { type Config, loadConfig } from './config';
3
3
  export { checkReadmeFiles, checkReadmeString, collapseReadmeFiles, expandReadmeFiles, expandReadmeString, } from './readme/api';
4
4
  export { loadConfigReadme } from './readme/config';
5
- export { type Rules } from 'remark-mdat';
5
+ export { type Rules, deepMergeDefined as mergeConfigs } from 'remark-mdat';
package/dist/index.js CHANGED
@@ -28,4 +28,4 @@ ${r}
28
28
  <source media="(prefers-color-scheme: dark)" srcset="${C.relative(o,e)}">
29
29
  <source media="(prefers-color-scheme: light)" srcset="${i}">
30
30
  <img alt="${n}" src="${i}">
31
- </picture>`}async function kt(t){let e=await A.readFile(t),n=Un.createHash("sha1");return n.update(e),n.digest("hex").slice(0,8)}function Nt(t){return t.replace(/\.[^./]+$/,"")}import{getSoleRule as In}from"remark-mdat";var xt={toc:{applicationOrder:1,content:[In(ee)]}};var $t={...V,...B,...wt,...St,...G,...Rt,...Lt,...Y,...W,...ee,...Tt,...xt,...X};async function N(t){let e={addMetaComment:!0,rules:$t},{additionalConfig:n=[],...r}=t??{},o=Array.isArray(n)?n:[n],i=await y({additionalConfig:[e,...o],...r});if(i.packageFile===void 0)throw new Error("Package file path is required in `mdat readme` config");return i}import{findUp as _n}from"find-up";import{packageDirectory as Vn}from"pkg-dir";import{log as At}from"remark-mdat";async function Jn(){At.info("Searching for package directory...");let t=await Vn()??process.cwd(),e=await _n("readme.md",{stopAt:t,type:"file"});if(e!==void 0)return At.info(`Found closest readme at "${e}"`),e}async function te(){let t=await Jn();if(t===void 0)throw new Error("No readme found");return t}async function Bn(t,e,n,r,o){return t??=await te(),E(t,N,T,e,n,r,o)}async function Hn(t,e,n){return O(t,N,T,e,n)}async function zn(t,e,n,r,o){return t??=await te(),E(t,N,x,e,n,r,o)}async function qn(t,e,n){return O(t,N,x,e,n)}async function Kn(t,e,n,r,o){return t??=await te(),E(t,N,M,e,n,r,o)}export{Zt as checkFiles,zn as checkReadmeFiles,qn as checkReadmeString,Xt as checkString,Qt as collapseFiles,Kn as collapseReadmeFiles,en as collapseString,Yt as expandFiles,Bn as expandReadmeFiles,Hn as expandReadmeString,Wt as expandString,y as loadConfig,N as loadConfigReadme};
31
+ </picture>`}async function kt(t){let e=await A.readFile(t),n=Un.createHash("sha1");return n.update(e),n.digest("hex").slice(0,8)}function Nt(t){return t.replace(/\.[^./]+$/,"")}import{getSoleRule as In}from"remark-mdat";var xt={toc:{applicationOrder:1,content:[In(ee)]}};var $t={...V,...B,...wt,...St,...G,...Rt,...Lt,...Y,...W,...ee,...Tt,...xt,...X};async function N(t){let e={addMetaComment:!0,rules:$t},{additionalConfig:n=[],...r}=t??{},o=Array.isArray(n)?n:[n],i=await y({additionalConfig:[e,...o],...r});if(i.packageFile===void 0)throw new Error("Package file path is required in `mdat readme` config");return i}import{findUp as _n}from"find-up";import{packageDirectory as Vn}from"pkg-dir";import{log as At}from"remark-mdat";async function Jn(){At.info("Searching for package directory...");let t=await Vn()??process.cwd(),e=await _n("readme.md",{stopAt:t,type:"file"});if(e!==void 0)return At.info(`Found closest readme at "${e}"`),e}async function te(){let t=await Jn();if(t===void 0)throw new Error("No readme found");return t}async function Bn(t,e,n,r,o){return t??=await te(),E(t,N,T,e,n,r,o)}async function Hn(t,e,n){return O(t,N,T,e,n)}async function zn(t,e,n,r,o){return t??=await te(),E(t,N,x,e,n,r,o)}async function qn(t,e,n){return O(t,N,x,e,n)}async function Kn(t,e,n,r,o){return t??=await te(),E(t,N,M,e,n,r,o)}import{deepMergeDefined as Li}from"remark-mdat";export{Zt as checkFiles,zn as checkReadmeFiles,qn as checkReadmeString,Xt as checkString,Qt as collapseFiles,Kn as collapseReadmeFiles,en as collapseString,Yt as expandFiles,Bn as expandReadmeFiles,Hn as expandReadmeString,Wt as expandString,y as loadConfig,N as loadConfigReadme,Li as mergeConfigs};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdat",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "type": "module",
5
5
  "description": "CLI tool and library for using comments as content templates in Markdown files, with helpful presets for readmes.",
6
6
  "repository": {
@@ -70,7 +70,7 @@
70
70
  "which": "^4.0.0",
71
71
  "yargs": "^17.7.2",
72
72
  "zod": "^3.22.4",
73
- "remark-mdat": "0.5.0"
73
+ "remark-mdat": "0.5.1"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/node": "^20.11.17",
package/readme.md CHANGED
@@ -747,15 +747,15 @@ Compound rules combine several stand-alone rules under a single keyword, which c
747
747
 
748
748
  The `init` command provides a number of "starter readme" templates incorporating `mdat` comment placeholders:
749
749
 
750
- - ##### Mdat Readme
750
+ - #### Mdat Readme
751
751
 
752
752
  The house style. An expansive starting point. Prune to your context and taste. The readme files in this monorepo started from this template.
753
753
 
754
- - ##### Standard Readme basic
754
+ - #### Standard Readme basic
755
755
 
756
756
  Includes only the "required" sections from the [Standard Readme](https://github.com/RichardLitt/standard-readme/blob/main/spec.md) specification. [See an example](https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/minimal-readme.md).
757
757
 
758
- - ##### Standard Readme full
758
+ - #### Standard Readme full
759
759
 
760
760
  Includes all sections from the [Standard Readme](https://github.com/RichardLitt/standard-readme/blob/main/spec.md) specification. [See an example](https://github.com/RichardLitt/standard-readme/blob/main/example-readmes/maximal-readme.md).
761
761