@masumdev/markforge 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/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@masumdev/markforge",
3
+ "version": "0.1.0",
4
+ "description": "Modern, high-performance Markdown & MDX multi-format document publishing engine and CLI (DOCX, PDF, HTML, and Images) with embedded HTML/CSS, image inliner, and Ink terminal UI.",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "markforge": "./dist/cli.mjs"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.js",
16
+ "default": "./dist/index.js"
17
+ },
18
+ "./schema.json": "./schema.json"
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "schema.json",
23
+ "README.md",
24
+ "LICENSE"
25
+ ],
26
+ "scripts": {
27
+ "build": "tsup",
28
+ "dev": "tsup --watch",
29
+ "clean": "rm -rf dist",
30
+ "test": "bun test",
31
+ "test:coverage": "bun test --coverage"
32
+ },
33
+ "keywords": [
34
+ "markdown",
35
+ "mdx",
36
+ "docx",
37
+ "pdf",
38
+ "html",
39
+ "converter",
40
+ "document-generator",
41
+ "word",
42
+ "publishing",
43
+ "ink",
44
+ "cli",
45
+ "markforge"
46
+ ],
47
+ "author": "Ma'sum",
48
+ "license": "MIT",
49
+ "homepage": "https://react-native-library-docs.netlify.app/markforge/",
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git+https://github.com/masumrpg/react-native-library.git",
53
+ "directory": "packages/markforge"
54
+ },
55
+ "bugs": {
56
+ "url": "https://github.com/masumrpg/react-native-library/issues"
57
+ },
58
+ "dependencies": {
59
+ "commander": "^13.1.0",
60
+ "docx": "^9.2.0",
61
+ "gray-matter": "^4.0.3",
62
+ "ink": "^6.1.0",
63
+ "ink-spinner": "^5.0.0",
64
+ "ink-table": "^3.1.0",
65
+ "picocolors": "^1.1.1",
66
+ "react": "^19.0.0",
67
+ "yaml": "^2.7.0"
68
+ },
69
+ "devDependencies": {
70
+ "@types/react": "^19.0.0",
71
+ "bun-types": "^1.4.0",
72
+ "ink-testing-library": "^4.0.0",
73
+ "tsup": "^8.3.6",
74
+ "typescript": "^5.7.3"
75
+ },
76
+ "publishConfig": {
77
+ "access": "public"
78
+ }
79
+ }
package/schema.json ADDED
@@ -0,0 +1,116 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "MarkforgeConfig",
4
+ "description": "Configuration schema for @masumdev/markforge Markdown & MDX document publishing engine",
5
+ "type": "object",
6
+ "properties": {
7
+ "$schema": {
8
+ "type": "string",
9
+ "description": "JSON schema reference URI"
10
+ },
11
+ "to": {
12
+ "description": "Target formats to compile markdown to",
13
+ "oneOf": [
14
+ {
15
+ "type": "string",
16
+ "enum": ["docx", "pdf", "html", "png"]
17
+ },
18
+ {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "string",
22
+ "enum": ["docx", "pdf", "html", "png"]
23
+ }
24
+ }
25
+ ],
26
+ "default": ["docx", "pdf"]
27
+ },
28
+ "outputDir": {
29
+ "type": "string",
30
+ "description": "Output directory for compiled documents"
31
+ },
32
+ "theme": {
33
+ "type": "string",
34
+ "description": "Visual document theme",
35
+ "enum": ["default", "academic", "github", "corporate", "minimal", "dracula"],
36
+ "default": "default"
37
+ },
38
+ "css": {
39
+ "description": "Custom CSS stylesheet(s) to inject",
40
+ "oneOf": [
41
+ { "type": "string" },
42
+ { "type": "array", "items": { "type": "string" } }
43
+ ]
44
+ },
45
+ "orientation": {
46
+ "type": "string",
47
+ "enum": ["portrait", "landscape"],
48
+ "default": "portrait"
49
+ },
50
+ "paperSize": {
51
+ "type": "string",
52
+ "enum": ["A4", "Letter", "Legal", "A3", "A5"],
53
+ "default": "A4"
54
+ },
55
+ "margins": {
56
+ "type": "object",
57
+ "properties": {
58
+ "top": { "type": ["string", "number"] },
59
+ "bottom": { "type": ["string", "number"] },
60
+ "left": { "type": ["string", "number"] },
61
+ "right": { "type": ["string", "number"] }
62
+ }
63
+ },
64
+ "header": {
65
+ "type": "object",
66
+ "properties": {
67
+ "left": { "type": "string" },
68
+ "center": { "type": "string" },
69
+ "right": { "type": "string" }
70
+ }
71
+ },
72
+ "footer": {
73
+ "type": "object",
74
+ "properties": {
75
+ "left": { "type": "string" },
76
+ "center": { "type": "string" },
77
+ "right": { "type": "string" }
78
+ }
79
+ },
80
+ "toc": {
81
+ "type": "boolean",
82
+ "description": "Auto-generate Table of Contents",
83
+ "default": false
84
+ },
85
+ "watermark": {
86
+ "type": "string",
87
+ "description": "Watermark text across pages"
88
+ },
89
+ "embedImages": {
90
+ "type": "boolean",
91
+ "description": "Whether to inline/embed all images",
92
+ "default": true
93
+ },
94
+ "watch": {
95
+ "type": "boolean",
96
+ "description": "Watch mode for hot compilation",
97
+ "default": false
98
+ },
99
+ "serve": {
100
+ "type": "boolean",
101
+ "description": "Start local preview HTTP server",
102
+ "default": false
103
+ },
104
+ "port": {
105
+ "type": "number",
106
+ "description": "Local preview server port",
107
+ "default": 4000
108
+ },
109
+ "open": {
110
+ "type": "boolean",
111
+ "description": "Open document in browser on compile",
112
+ "default": false
113
+ }
114
+ },
115
+ "additionalProperties": true
116
+ }