ts-markdown-builder 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Maciej Jastrzebski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ [![npm version](https://badge.fury.io/js/ts-markdown-builder.svg)](https://badge.fury.io/js/ts-markdown-builder)
2
+ ![Build](https://github.com/mdjastrzebski/ts-markdown-builder/actions/workflows/ci.yml/badge.svg)
3
+ ![npm bundle size](https://deno.bundlejs.com/badge?q=ts-markdown-builder)
4
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)
5
+ [![Star on GitHub](https://img.shields.io/github/stars/mdjastrzebski/ts-markdown-builder.svg?style=social)](https://github.com/mdjastrzebski/ts-markdown-builder/stargazers)
6
+
7
+ # TS Markdown Builder
8
+
9
+ Elegant markdown builder with minimal bundle size.
10
+
11
+ ## Goal
12
+
13
+ TODO
14
+
15
+ ```ts
16
+ TODO;
17
+ ```
18
+
19
+ ## Installation
20
+
21
+ ```sh
22
+ npm install ts-markdown-builder
23
+ ```
24
+
25
+ ## Basic usage
26
+
27
+ ```js
28
+ import * as md from 'ts-markdown-builder';
29
+
30
+ const output = md.heading('Hello World', 1);
31
+ ```
32
+
33
+ ## Contributing
34
+
35
+ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
36
+
37
+ ## License
38
+
39
+ MIT
40
+
41
+ ## Reference
42
+
43
+ TODO
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ exports.blockquote = blockquote;
4
+ exports.codeBlock = codeBlock;
5
+ exports.heading = heading;
6
+ exports.horizontalRule = void 0;
7
+ exports.orderedList = orderedList;
8
+ exports.unorderedList = unorderedList;
9
+ var _utils = require("./utils.js");
10
+ const horizontalRule = exports.horizontalRule = '\n---\n';
11
+ function heading(text, level = 1) {
12
+ return `${'#'.repeat(level)} ${text}`;
13
+ }
14
+ function blockquote(text) {
15
+ return (0, _utils.prefixLines)(text, '> ');
16
+ }
17
+ function codeBlock(text) {
18
+ return `\`\`\`\n${text}\n\`\`\``;
19
+ }
20
+ function orderedList(items) {
21
+ return items.map((item, index) => `${index + 1}. ${item}`).join('\n');
22
+ }
23
+ function unorderedList(items) {
24
+ return items.map(item => `- ${item}`).join('\n');
25
+ }
26
+ //# sourceMappingURL=block.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block.js","names":["horizontalRule","exports","heading","text","level","repeat","blockquote","prefixLines","codeBlock","orderedList","items","map","item","index","join","unorderedList"],"sources":["../../src/block.ts"],"sourcesContent":["import { prefixLines } from './utils';\n\n// Ref: https://www.markdownguide.org/basic-syntax/\n\nexport const horizontalRule = '\\n---\\n';\n\nexport function heading(text: string, level: number = 1): string {\n return `${'#'.repeat(level)} ${text}`;\n}\n\nexport function blockquote(text: string): string {\n return prefixLines(text, '> ');\n}\n\nexport function codeBlock(text: string): string {\n return `\\`\\`\\`\\n${text}\\n\\`\\`\\``;\n}\n\nexport function orderedList(items: string[]): string {\n return items.map((item, index) => `${index + 1}. ${item}`).join('\\n');\n}\n\nexport function unorderedList(items: string[]): string {\n return items.map((item) => `- ${item}`).join('\\n');\n}\n"],"mappings":";;;;;;;;;AAIO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,SAAS;AAEhC,SAASE,OAAOA,CAACC,IAAY,EAAEC,KAAa,GAAG,CAAC,EAAU;EAC/D,OAAO,GAAG,GAAG,CAACC,MAAM,CAACD,KAAK,CAAC,IAAID,IAAI,EAAE;AACvC;AAEO,SAASG,UAAUA,CAACH,IAAY,EAAU;EAC/C,OAAO,IAAAI,kBAAW,EAACJ,IAAI,EAAE,IAAI,CAAC;AAChC;AAEO,SAASK,SAASA,CAACL,IAAY,EAAU;EAC9C,OAAO,WAAWA,IAAI,UAAU;AAClC;AAEO,SAASM,WAAWA,CAACC,KAAe,EAAU;EACnD,OAAOA,KAAK,CAACC,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK,GAAGA,KAAK,GAAG,CAAC,KAAKD,IAAI,EAAE,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;AACvE;AAEO,SAASC,aAAaA,CAACL,KAAe,EAAU;EACrD,OAAOA,KAAK,CAACC,GAAG,CAAEC,IAAI,IAAK,KAAKA,IAAI,EAAE,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;AACpD","ignoreList":[]}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "blockquote", {
4
+ enumerable: true,
5
+ get: function () {
6
+ return _block.blockquote;
7
+ }
8
+ });
9
+ Object.defineProperty(exports, "bold", {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _inline.bold;
13
+ }
14
+ });
15
+ Object.defineProperty(exports, "code", {
16
+ enumerable: true,
17
+ get: function () {
18
+ return _inline.code;
19
+ }
20
+ });
21
+ Object.defineProperty(exports, "codeBlock", {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _block.codeBlock;
25
+ }
26
+ });
27
+ Object.defineProperty(exports, "heading", {
28
+ enumerable: true,
29
+ get: function () {
30
+ return _block.heading;
31
+ }
32
+ });
33
+ Object.defineProperty(exports, "horizontalRule", {
34
+ enumerable: true,
35
+ get: function () {
36
+ return _block.horizontalRule;
37
+ }
38
+ });
39
+ Object.defineProperty(exports, "image", {
40
+ enumerable: true,
41
+ get: function () {
42
+ return _inline.image;
43
+ }
44
+ });
45
+ Object.defineProperty(exports, "italic", {
46
+ enumerable: true,
47
+ get: function () {
48
+ return _inline.italic;
49
+ }
50
+ });
51
+ Object.defineProperty(exports, "lineBreak", {
52
+ enumerable: true,
53
+ get: function () {
54
+ return _inline.lineBreak;
55
+ }
56
+ });
57
+ Object.defineProperty(exports, "link", {
58
+ enumerable: true,
59
+ get: function () {
60
+ return _inline.link;
61
+ }
62
+ });
63
+ Object.defineProperty(exports, "orderedList", {
64
+ enumerable: true,
65
+ get: function () {
66
+ return _block.orderedList;
67
+ }
68
+ });
69
+ Object.defineProperty(exports, "unorderedList", {
70
+ enumerable: true,
71
+ get: function () {
72
+ return _block.unorderedList;
73
+ }
74
+ });
75
+ var _block = require("./block.js");
76
+ var _inline = require("./inline.js");
77
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export {\n horizontalRule,\n heading,\n blockquote,\n orderedList,\n unorderedList,\n codeBlock,\n} from './block';\nexport { lineBreak, code, italic, bold, link, image } from './inline';\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ exports.bold = bold;
4
+ exports.code = code;
5
+ exports.image = image;
6
+ exports.italic = italic;
7
+ exports.lineBreak = void 0;
8
+ exports.link = link;
9
+ const lineBreak = exports.lineBreak = ' \n';
10
+ function italic(text) {
11
+ return `*${text}*`;
12
+ }
13
+ function bold(text) {
14
+ return `**${text}**`;
15
+ }
16
+ function code(text) {
17
+ return `\`${text}\``;
18
+ }
19
+ function link(url, text) {
20
+ return text ? `[${text}](${url})` : `<${url}>`;
21
+ }
22
+ function image(url, text) {
23
+ return `![${text ?? ''}](${url})`;
24
+ }
25
+ //# sourceMappingURL=inline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline.js","names":["lineBreak","exports","italic","text","bold","code","link","url","image"],"sources":["../../src/inline.ts"],"sourcesContent":["// Ref: https://www.markdownguide.org/basic-syntax/\n\nexport const lineBreak = ' \\n';\n\nexport function italic(text: string): string {\n return `*${text}*`;\n}\n\nexport function bold(text: string): string {\n return `**${text}**`;\n}\n\nexport function code(text: string): string {\n return `\\`${text}\\``;\n}\n\nexport function link(url: string, text?: string): string {\n return text ? `[${text}](${url})` : `<${url}>`;\n}\n\nexport function image(url: string, text?: string): string {\n return `![${text ?? ''}](${url})`;\n}\n"],"mappings":";;;;;;;;AAEO,MAAMA,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,MAAM;AAExB,SAASE,MAAMA,CAACC,IAAY,EAAU;EAC3C,OAAO,IAAIA,IAAI,GAAG;AACpB;AAEO,SAASC,IAAIA,CAACD,IAAY,EAAU;EACzC,OAAO,KAAKA,IAAI,IAAI;AACtB;AAEO,SAASE,IAAIA,CAACF,IAAY,EAAU;EACzC,OAAO,KAAKA,IAAI,IAAI;AACtB;AAEO,SAASG,IAAIA,CAACC,GAAW,EAAEJ,IAAa,EAAU;EACvD,OAAOA,IAAI,GAAG,IAAIA,IAAI,KAAKI,GAAG,GAAG,GAAG,IAAIA,GAAG,GAAG;AAChD;AAEO,SAASC,KAAKA,CAACD,GAAW,EAAEJ,IAAa,EAAU;EACxD,OAAO,KAAKA,IAAI,IAAI,EAAE,KAAKI,GAAG,GAAG;AACnC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/types.ts"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ exports.prefixLines = prefixLines;
4
+ function prefixLines(text, prefix) {
5
+ const lines = text.split('\n');
6
+ return lines.map(line => `${prefix}${line}`).join('\n');
7
+ }
8
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":["prefixLines","text","prefix","lines","split","map","line","join"],"sources":["../../src/utils.ts"],"sourcesContent":["export function prefixLines(text: string, prefix: string): string {\n const lines = text.split('\\n');\n return lines.map((line) => `${prefix}${line}`).join('\\n');\n}\n"],"mappings":";;;AAAO,SAASA,WAAWA,CAACC,IAAY,EAAEC,MAAc,EAAU;EAChE,MAAMC,KAAK,GAAGF,IAAI,CAACG,KAAK,CAAC,IAAI,CAAC;EAC9B,OAAOD,KAAK,CAACE,GAAG,CAAEC,IAAI,IAAK,GAAGJ,MAAM,GAAGI,IAAI,EAAE,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AAC3D","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ import { prefixLines } from "./utils.mjs";
2
+ export const horizontalRule = '\n---\n';
3
+ export function heading(text, level = 1) {
4
+ return `${'#'.repeat(level)} ${text}`;
5
+ }
6
+ export function blockquote(text) {
7
+ return prefixLines(text, '> ');
8
+ }
9
+ export function codeBlock(text) {
10
+ return `\`\`\`\n${text}\n\`\`\``;
11
+ }
12
+ export function orderedList(items) {
13
+ return items.map((item, index) => `${index + 1}. ${item}`).join('\n');
14
+ }
15
+ export function unorderedList(items) {
16
+ return items.map(item => `- ${item}`).join('\n');
17
+ }
18
+ //# sourceMappingURL=block.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block.mjs","names":["prefixLines","horizontalRule","heading","text","level","repeat","blockquote","codeBlock","orderedList","items","map","item","index","join","unorderedList"],"sources":["../../src/block.ts"],"sourcesContent":["import { prefixLines } from './utils';\n\n// Ref: https://www.markdownguide.org/basic-syntax/\n\nexport const horizontalRule = '\\n---\\n';\n\nexport function heading(text: string, level: number = 1): string {\n return `${'#'.repeat(level)} ${text}`;\n}\n\nexport function blockquote(text: string): string {\n return prefixLines(text, '> ');\n}\n\nexport function codeBlock(text: string): string {\n return `\\`\\`\\`\\n${text}\\n\\`\\`\\``;\n}\n\nexport function orderedList(items: string[]): string {\n return items.map((item, index) => `${index + 1}. ${item}`).join('\\n');\n}\n\nexport function unorderedList(items: string[]): string {\n return items.map((item) => `- ${item}`).join('\\n');\n}\n"],"mappings":"SAASA,WAAW;AAIpB,OAAO,MAAMC,cAAc,GAAG,SAAS;AAEvC,OAAO,SAASC,OAAOA,CAACC,IAAY,EAAEC,KAAa,GAAG,CAAC,EAAU;EAC/D,OAAO,GAAG,GAAG,CAACC,MAAM,CAACD,KAAK,CAAC,IAAID,IAAI,EAAE;AACvC;AAEA,OAAO,SAASG,UAAUA,CAACH,IAAY,EAAU;EAC/C,OAAOH,WAAW,CAACG,IAAI,EAAE,IAAI,CAAC;AAChC;AAEA,OAAO,SAASI,SAASA,CAACJ,IAAY,EAAU;EAC9C,OAAO,WAAWA,IAAI,UAAU;AAClC;AAEA,OAAO,SAASK,WAAWA,CAACC,KAAe,EAAU;EACnD,OAAOA,KAAK,CAACC,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,KAAK,GAAGA,KAAK,GAAG,CAAC,KAAKD,IAAI,EAAE,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;AACvE;AAEA,OAAO,SAASC,aAAaA,CAACL,KAAe,EAAU;EACrD,OAAOA,KAAK,CAACC,GAAG,CAAEC,IAAI,IAAK,KAAKA,IAAI,EAAE,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;AACpD","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export { horizontalRule, heading, blockquote, orderedList, unorderedList, codeBlock } from "./block.mjs";
2
+ export { lineBreak, code, italic, bold, link, image } from "./inline.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["horizontalRule","heading","blockquote","orderedList","unorderedList","codeBlock","lineBreak","code","italic","bold","link","image"],"sources":["../../src/index.ts"],"sourcesContent":["export {\n horizontalRule,\n heading,\n blockquote,\n orderedList,\n unorderedList,\n codeBlock,\n} from './block';\nexport { lineBreak, code, italic, bold, link, image } from './inline';\n"],"mappings":"SACEA,cAAc,EACdC,OAAO,EACPC,UAAU,EACVC,WAAW,EACXC,aAAa,EACbC,SAAS;AAAA,SAEFC,SAAS,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ export const lineBreak = ' \n';
2
+ export function italic(text) {
3
+ return `*${text}*`;
4
+ }
5
+ export function bold(text) {
6
+ return `**${text}**`;
7
+ }
8
+ export function code(text) {
9
+ return `\`${text}\``;
10
+ }
11
+ export function link(url, text) {
12
+ return text ? `[${text}](${url})` : `<${url}>`;
13
+ }
14
+ export function image(url, text) {
15
+ return `![${text ?? ''}](${url})`;
16
+ }
17
+ //# sourceMappingURL=inline.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline.mjs","names":["lineBreak","italic","text","bold","code","link","url","image"],"sources":["../../src/inline.ts"],"sourcesContent":["// Ref: https://www.markdownguide.org/basic-syntax/\n\nexport const lineBreak = ' \\n';\n\nexport function italic(text: string): string {\n return `*${text}*`;\n}\n\nexport function bold(text: string): string {\n return `**${text}**`;\n}\n\nexport function code(text: string): string {\n return `\\`${text}\\``;\n}\n\nexport function link(url: string, text?: string): string {\n return text ? `[${text}](${url})` : `<${url}>`;\n}\n\nexport function image(url: string, text?: string): string {\n return `![${text ?? ''}](${url})`;\n}\n"],"mappings":"AAEA,OAAO,MAAMA,SAAS,GAAG,MAAM;AAE/B,OAAO,SAASC,MAAMA,CAACC,IAAY,EAAU;EAC3C,OAAO,IAAIA,IAAI,GAAG;AACpB;AAEA,OAAO,SAASC,IAAIA,CAACD,IAAY,EAAU;EACzC,OAAO,KAAKA,IAAI,IAAI;AACtB;AAEA,OAAO,SAASE,IAAIA,CAACF,IAAY,EAAU;EACzC,OAAO,KAAKA,IAAI,IAAI;AACtB;AAEA,OAAO,SAASG,IAAIA,CAACC,GAAW,EAAEJ,IAAa,EAAU;EACvD,OAAOA,IAAI,GAAG,IAAIA,IAAI,KAAKI,GAAG,GAAG,GAAG,IAAIA,GAAG,GAAG;AAChD;AAEA,OAAO,SAASC,KAAKA,CAACD,GAAW,EAAEJ,IAAa,EAAU;EACxD,OAAO,KAAKA,IAAI,IAAI,EAAE,KAAKI,GAAG,GAAG;AACnC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.mjs","names":[],"sources":["../../src/types.ts"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ export function prefixLines(text, prefix) {
2
+ const lines = text.split('\n');
3
+ return lines.map(line => `${prefix}${line}`).join('\n');
4
+ }
5
+ //# sourceMappingURL=utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.mjs","names":["prefixLines","text","prefix","lines","split","map","line","join"],"sources":["../../src/utils.ts"],"sourcesContent":["export function prefixLines(text: string, prefix: string): string {\n const lines = text.split('\\n');\n return lines.map((line) => `${prefix}${line}`).join('\\n');\n}\n"],"mappings":"AAAA,OAAO,SAASA,WAAWA,CAACC,IAAY,EAAEC,MAAc,EAAU;EAChE,MAAMC,KAAK,GAAGF,IAAI,CAACG,KAAK,CAAC,IAAI,CAAC;EAC9B,OAAOD,KAAK,CAACE,GAAG,CAAEC,IAAI,IAAK,GAAGJ,MAAM,GAAGI,IAAI,EAAE,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AAC3D","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ export declare const horizontalRule = "\n---\n";
2
+ export declare function heading(text: string, level?: number): string;
3
+ export declare function blockquote(text: string): string;
4
+ export declare function codeBlock(text: string): string;
5
+ export declare function orderedList(items: string[]): string;
6
+ export declare function unorderedList(items: string[]): string;
@@ -0,0 +1,2 @@
1
+ export { horizontalRule, heading, blockquote, orderedList, unorderedList, codeBlock, } from './block';
2
+ export { lineBreak, code, italic, bold, link, image } from './inline';
@@ -0,0 +1,6 @@
1
+ export declare const lineBreak = " \n";
2
+ export declare function italic(text: string): string;
3
+ export declare function bold(text: string): string;
4
+ export declare function code(text: string): string;
5
+ export declare function link(url: string, text?: string): string;
6
+ export declare function image(url: string, text?: string): string;
File without changes
@@ -0,0 +1 @@
1
+ export declare function prefixLines(text: string, prefix: string): string;
package/package.json ADDED
@@ -0,0 +1,152 @@
1
+ {
2
+ "name": "ts-markdown-builder",
3
+ "version": "0.1.0",
4
+ "description": "Elegant markdown builder with minimal bundle size.",
5
+ "main": "dist/commonjs/index.js",
6
+ "module": "dist/esm/index.mjs",
7
+ "types": "dist/types/src/index.d.ts",
8
+ "source": "src/index.ts",
9
+ "sideEffects": false,
10
+ "files": [
11
+ "dist",
12
+ "!**/__tests__",
13
+ "!**/.*"
14
+ ],
15
+ "exports": {
16
+ ".": {
17
+ "require": "./dist/commonjs/index.js",
18
+ "import": "./dist/esm/index.mjs",
19
+ "types": "./dist/types/index.d.ts"
20
+ }
21
+ },
22
+ "scripts": {
23
+ "test": "jest",
24
+ "typecheck": "tsc --noEmit",
25
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
26
+ "clean": "del-cli dist",
27
+ "release": "release-it",
28
+ "release:beta": "release-it --preRelease=beta",
29
+ "build": "yarn clean && yarn build:commonjs && yarn build:esm && yarn build:typescript",
30
+ "build:commonjs": "BABEL_ENV=cjs babel src --out-dir \"dist/commonjs\" --extensions .js,.ts --out-file-extension .js --source-maps --no-comments",
31
+ "build:esm": "BABEL_ENV=esm babel src --out-dir \"dist/esm\" --extensions .js,.ts --out-file-extension .mjs --source-maps --no-comments",
32
+ "build:typescript": "tsc --project tsconfig.release.json --outDir \"dist/types\""
33
+ },
34
+ "keywords": [
35
+ "markdown",
36
+ "typescript"
37
+ ],
38
+ "repository": "https://github.com/mdjastrzebski/ts-markdown-builder",
39
+ "author": "Maciej Jastrzebski <mdjastrzebski@gmail.com> (https://github.com/mdjastrzebski)",
40
+ "license": "MIT",
41
+ "bugs": {
42
+ "url": "https://github.com/mdjastrzebski/ts-markdown-builder/issues"
43
+ },
44
+ "homepage": "https://github.com/mdjastrzebski/ts-markdown-builder#readme",
45
+ "publishConfig": {
46
+ "registry": "https://registry.npmjs.org/"
47
+ },
48
+ "devDependencies": {
49
+ "@babel/cli": "^7.24.8",
50
+ "@babel/core": "^7.25.2",
51
+ "@babel/plugin-syntax-flow": "^7.24.7",
52
+ "@babel/plugin-transform-react-jsx": "^7.25.2",
53
+ "@babel/preset-env": "^7.25.4",
54
+ "@babel/preset-typescript": "^7.24.7",
55
+ "@callstack/eslint-config": "^15.0.0",
56
+ "@release-it/conventional-changelog": "^8.0.1",
57
+ "@size-limit/preset-small-lib": "^11.1.4",
58
+ "@types/jest": "^29.5.12",
59
+ "babel-plugin-add-import-extension": "^1.6.0",
60
+ "del-cli": "^5.1.0",
61
+ "eslint": "^8.57.0",
62
+ "eslint-config-prettier": "^8.10.0",
63
+ "eslint-plugin-flowtype": "^8.0.3",
64
+ "eslint-plugin-import": "^2.29.1",
65
+ "eslint-plugin-prettier": "^4.2.1",
66
+ "jest": "^29.7.0",
67
+ "prettier": "^2.8.8",
68
+ "release-it": "^17.6.0",
69
+ "typescript": "^5.5.4"
70
+ },
71
+ "packageManager": "yarn@4.4.1",
72
+ "engines": {
73
+ "node": ">= 18.0.0"
74
+ },
75
+ "jest": {
76
+ "setupFilesAfterEnv": [
77
+ "<rootDir>/jest-setup.ts"
78
+ ],
79
+ "collectCoverageFrom": [
80
+ "src/**/*.{js,jsx,ts,tsx}"
81
+ ],
82
+ "modulePathIgnorePatterns": [
83
+ "<rootDir>/dist/"
84
+ ]
85
+ },
86
+ "release-it": {
87
+ "git": {
88
+ "commitMessage": "chore: release ${version}",
89
+ "tagName": "v${version}"
90
+ },
91
+ "npm": {
92
+ "publish": true
93
+ },
94
+ "github": {
95
+ "release": true
96
+ },
97
+ "plugins": {
98
+ "@release-it/conventional-changelog": {
99
+ "preset": "angular"
100
+ }
101
+ }
102
+ },
103
+ "eslintConfig": {
104
+ "root": true,
105
+ "extends": [
106
+ "@callstack/eslint-config/node",
107
+ "prettier"
108
+ ],
109
+ "plugins": [
110
+ "import"
111
+ ],
112
+ "rules": {
113
+ "prettier/prettier": [
114
+ "error",
115
+ {
116
+ "quoteProps": "consistent",
117
+ "singleQuote": true,
118
+ "tabWidth": 2,
119
+ "trailingComma": "all",
120
+ "useTabs": false
121
+ }
122
+ ],
123
+ "sort-imports": [
124
+ "error",
125
+ {
126
+ "ignoreCase": true,
127
+ "ignoreDeclarationSort": true
128
+ }
129
+ ],
130
+ "import/order": "error"
131
+ }
132
+ },
133
+ "eslintIgnore": [
134
+ "node_modules/",
135
+ "dist/",
136
+ "coverage/",
137
+ "website/"
138
+ ],
139
+ "prettier": {
140
+ "quoteProps": "consistent",
141
+ "singleQuote": true,
142
+ "tabWidth": 2,
143
+ "trailingComma": "all",
144
+ "useTabs": false
145
+ },
146
+ "size-limit": [
147
+ {
148
+ "path": "./dist/esm/index.mjs",
149
+ "limit": "1 kB"
150
+ }
151
+ ]
152
+ }