@cenk1cenk2/md-printer 2.2.25 → 2.2.26

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.
@@ -80,7 +80,7 @@ var MDPrinter = class extends import_oclif_common.Command {
80
80
  }
81
81
  async shouldRunBefore() {
82
82
  this.tasks.options = {
83
- rendererSilent: true
83
+ silentRendererCondition: true
84
84
  };
85
85
  }
86
86
  async run() {
@@ -220,17 +220,13 @@ __publicField(MDPrinter, "flags", {
220
220
  description: "Run with Chrome browser instead of publishing the file."
221
221
  })
222
222
  });
223
- __publicField(MDPrinter, "args", [
224
- {
225
- name: "file",
223
+ __publicField(MDPrinter, "args", {
224
+ file: import_oclif_common.Args.string({
226
225
  description: "Markdown file to be processed.",
227
226
  required: true
228
- },
229
- {
230
- name: "output",
227
+ }),
228
+ output: import_oclif_common.Args.string({
231
229
  description: "Output file that will be generated. Overwrites the one define in front-matter.",
232
230
  required: false
233
- }
234
- ]);
235
- // Annotate the CommonJS export names for ESM import in node:
236
- 0 && (module.exports = {});
231
+ })
232
+ });
@@ -24,5 +24,3 @@ __export(not_found_hook_exports, {
24
24
  module.exports = __toCommonJS(not_found_hook_exports);
25
25
  var import_oclif_common = require("@cenk1cenk2/oclif-common");
26
26
  var not_found_hook_default = import_oclif_common.notFoundHook;
27
- // Annotate the CommonJS export names for ESM import in node:
28
- 0 && (module.exports = {});
@@ -24,5 +24,3 @@ __export(update_notifier_hook_exports, {
24
24
  module.exports = __toCommonJS(update_notifier_hook_exports);
25
25
  var import_oclif_common = require("@cenk1cenk2/oclif-common");
26
26
  var update_notifier_hook_default = import_oclif_common.updateNotifierHook;
27
- // Annotate the CommonJS export names for ESM import in node:
28
- 0 && (module.exports = {});
@@ -1,4 +1,57 @@
1
1
  {
2
- "version": "2.2.24",
3
- "commands": {}
2
+ "version": "2.2.25",
3
+ "commands": {
4
+ ".": {
5
+ "id": ".",
6
+ "description": "Generates a PDF from the given markdown file with the selected HTML template.",
7
+ "strict": true,
8
+ "pluginName": "@cenk1cenk2/md-printer",
9
+ "pluginAlias": "@cenk1cenk2/md-printer",
10
+ "pluginType": "core",
11
+ "aliases": [],
12
+ "flags": {
13
+ "template": {
14
+ "name": "template",
15
+ "type": "option",
16
+ "char": "t",
17
+ "description": "HTML template for the generated PDF file.",
18
+ "multiple": false,
19
+ "default": "default"
20
+ },
21
+ "title": {
22
+ "name": "title",
23
+ "type": "option",
24
+ "char": "T",
25
+ "description": "Overwrite document title.",
26
+ "multiple": false
27
+ },
28
+ "watch": {
29
+ "name": "watch",
30
+ "type": "boolean",
31
+ "char": "w",
32
+ "description": "Watch the changes on the given file.",
33
+ "allowNo": false
34
+ },
35
+ "dev": {
36
+ "name": "dev",
37
+ "type": "boolean",
38
+ "char": "d",
39
+ "description": "Run with Chrome browser instead of publishing the file.",
40
+ "allowNo": false
41
+ }
42
+ },
43
+ "args": {
44
+ "file": {
45
+ "name": "file",
46
+ "description": "Markdown file to be processed.",
47
+ "required": true
48
+ },
49
+ "output": {
50
+ "name": "output",
51
+ "description": "Output file that will be generated. Overwrites the one define in front-matter.",
52
+ "required": false
53
+ }
54
+ }
55
+ }
56
+ }
4
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cenk1cenk2/md-printer",
3
- "version": "2.2.25",
3
+ "version": "2.2.26",
4
4
  "description": "A markdown printer.",
5
5
  "main": "dist/index.js",
6
6
  "repository": "https://gitlab.kilic.dev/utils/md-printer",
@@ -15,17 +15,16 @@
15
15
  "scripts": {
16
16
  "dev": "./bin/dev",
17
17
  "start": "./bin/run",
18
- "prebuild": "yarn run manifest && yarn run docs:toc",
19
18
  "build": "tsup-node",
20
19
  "dev:start": "tsup-node --watch",
21
20
  "clean": "rimraf oclif.manifset.json",
22
- "lint": "prettier --write src/ --loglevel warn && eslint --ext .ts,.js,.tsx,.jsx --fix src/",
23
- "lint:check": "eslint --ext .ts,.js,.tsx,.jsx src/",
21
+ "format": "prettier --write src/ --loglevel warn && eslint --ext .ts,.js,.tsx,.jsx --fix src/",
22
+ "lint": "eslint --ext .ts,.js,.tsx,.jsx src/",
24
23
  "manifest": "oclif manifest",
25
24
  "docs:toc": "oclif readme"
26
25
  },
27
26
  "simple-git-hooks": {
28
- "pre-commit": "yarn exec lint-staged",
27
+ "pre-commit": "pnpm exec lint-staged",
29
28
  "prepare-commit-msg": "[ -t 1 ] && exec < /dev/tty && git cz --hook || true"
30
29
  },
31
30
  "lint-staged": {
@@ -68,45 +67,47 @@
68
67
  "cenk1cenk2"
69
68
  ],
70
69
  "dependencies": {
71
- "@cenk1cenk2/oclif-common": "^3.9.11",
72
- "@oclif/core": "^1",
73
- "@oclif/plugin-help": "^5.2.4",
70
+ "@cenk1cenk2/oclif-common": "^5.0.3",
71
+ "@oclif/core": "^2.8.0",
72
+ "@oclif/plugin-help": "^5.2.9",
74
73
  "chokidar": "^3.5.3",
75
74
  "class-transformer": "^0.5.1",
76
75
  "class-validator": "^0.14.0",
77
76
  "config": "^3.3.9",
78
77
  "enquirer": "^2.3.6",
79
78
  "execa": "^5.1.1",
80
- "fs-extra": "^11.1.0",
79
+ "fs-extra": "^11.1.1",
81
80
  "globby": "^11.1.0",
82
81
  "gray-matter": "^4.0.3",
83
- "listr2": "^5.0.7",
84
- "md-to-pdf": "^5.2.1",
82
+ "listr2": "^6.0.4",
83
+ "md-to-pdf": "^5.2.4",
85
84
  "nunjucks": "^3.2.3",
86
- "tsup": "^6.6.0",
87
85
  "yaml": "^2.2.1"
88
86
  },
89
87
  "devDependencies": {
90
- "@cenk1cenk2/cz-cc": "^1.5.8",
91
- "@cenk1cenk2/eslint-config": "^2.5.48",
92
- "@swc/core": "^1.3.32",
88
+ "@cenk1cenk2/cz-cc": "^1.6.0",
89
+ "@cenk1cenk2/eslint-config": "^2.6.4",
90
+ "@swc/core": "^1.3.46",
93
91
  "@tailwindcss/forms": "^0.5.3",
94
92
  "@tailwindcss/typography": "^0.5.9",
95
93
  "@types/config": "^3.3.0",
96
- "@types/fs-extra": "^9.0.13",
97
- "@types/node": "^18.11.19",
98
- "@types/nunjucks": "^3.2.1",
99
- "eslint": "^8.33.0",
100
- "lint-staged": "^13.1.0",
101
- "oclif": "^3",
94
+ "@types/fs-extra": "^11.0.1",
95
+ "@types/node": "^18.15.11",
96
+ "@types/nunjucks": "^3.2.2",
97
+ "eslint": "^8.38.0",
98
+ "lint-staged": "^13.2.1",
99
+ "oclif": "^3.7.3",
102
100
  "postcss": "^8.4.21",
103
- "prettier": "^2.8.3",
101
+ "prettier": "^2.8.7",
104
102
  "simple-git-hooks": "^2.8.1",
105
103
  "source-map-support": "^0.5.21",
106
- "tailwindcss": "^3.2.4",
104
+ "tailwindcss": "^3.3.1",
107
105
  "theme-colors": "^0.0.5",
108
106
  "ts-node": "^10.9.1",
109
- "typescript": "^4.9.5"
107
+ "tsconfig-paths": "^4.2.0",
108
+ "tsconfig-replace-paths": "^0.0.14",
109
+ "tsup": "^6.7.0",
110
+ "typescript": "^5.0.4"
110
111
  },
111
112
  "config": {
112
113
  "commitizen": {
@@ -7,7 +7,7 @@ html {
7
7
  }
8
8
 
9
9
  /*
10
- ! tailwindcss v3.2.1 | MIT License | https://tailwindcss.com
10
+ ! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com
11
11
  */
12
12
 
13
13
  /*
@@ -38,6 +38,8 @@ html {
38
38
  2. Prevent adjustments of font size after orientation changes in iOS.
39
39
  3. Use a more readable tab size.
40
40
  4. Use the user's configured `sans` font-family by default.
41
+ 5. Use the user's configured `sans` font-feature-settings by default.
42
+ 6. Use the user's configured `sans` font-variation-settings by default.
41
43
  */
42
44
 
43
45
  html {
@@ -52,6 +54,10 @@ html {
52
54
  /* 3 */
53
55
  font-family: Montserrat;
54
56
  /* 4 */
57
+ font-feature-settings: normal;
58
+ /* 5 */
59
+ font-variation-settings: normal;
60
+ /* 6 */
55
61
  }
56
62
 
57
63
  /*
@@ -637,53 +643,6 @@ select {
637
643
  --tw-backdrop-sepia: ;
638
644
  }
639
645
 
640
- ::-webkit-backdrop {
641
- --tw-border-spacing-x: 0;
642
- --tw-border-spacing-y: 0;
643
- --tw-translate-x: 0;
644
- --tw-translate-y: 0;
645
- --tw-rotate: 0;
646
- --tw-skew-x: 0;
647
- --tw-skew-y: 0;
648
- --tw-scale-x: 1;
649
- --tw-scale-y: 1;
650
- --tw-pan-x: ;
651
- --tw-pan-y: ;
652
- --tw-pinch-zoom: ;
653
- --tw-scroll-snap-strictness: proximity;
654
- --tw-ordinal: ;
655
- --tw-slashed-zero: ;
656
- --tw-numeric-figure: ;
657
- --tw-numeric-spacing: ;
658
- --tw-numeric-fraction: ;
659
- --tw-ring-inset: ;
660
- --tw-ring-offset-width: 0px;
661
- --tw-ring-offset-color: #fff;
662
- --tw-ring-color: rgb(59 130 246 / 0.5);
663
- --tw-ring-offset-shadow: 0 0 #0000;
664
- --tw-ring-shadow: 0 0 #0000;
665
- --tw-shadow: 0 0 #0000;
666
- --tw-shadow-colored: 0 0 #0000;
667
- --tw-blur: ;
668
- --tw-brightness: ;
669
- --tw-contrast: ;
670
- --tw-grayscale: ;
671
- --tw-hue-rotate: ;
672
- --tw-invert: ;
673
- --tw-saturate: ;
674
- --tw-sepia: ;
675
- --tw-drop-shadow: ;
676
- --tw-backdrop-blur: ;
677
- --tw-backdrop-brightness: ;
678
- --tw-backdrop-contrast: ;
679
- --tw-backdrop-grayscale: ;
680
- --tw-backdrop-hue-rotate: ;
681
- --tw-backdrop-invert: ;
682
- --tw-backdrop-opacity: ;
683
- --tw-backdrop-saturate: ;
684
- --tw-backdrop-sepia: ;
685
- }
686
-
687
646
  ::backdrop {
688
647
  --tw-border-spacing-x: 0;
689
648
  --tw-border-spacing-y: 0;
@@ -736,6 +695,11 @@ select {
736
695
  max-width: 65ch;
737
696
  }
738
697
 
698
+ .prose :where(p):not(:where([class~="not-prose"] *)) {
699
+ margin-top: 1.25em;
700
+ margin-bottom: 1.25em;
701
+ }
702
+
739
703
  .prose :where([class~="lead"]):not(:where([class~="not-prose"] *)) {
740
704
  color: var(--tw-prose-lead);
741
705
  font-size: 1.25em;
@@ -1088,11 +1052,6 @@ select {
1088
1052
  line-height: 1.75;
1089
1053
  }
1090
1054
 
1091
- .prose :where(p):not(:where([class~="not-prose"] *)) {
1092
- margin-top: 1.25em;
1093
- margin-bottom: 1.25em;
1094
- }
1095
-
1096
1055
  .prose :where(video):not(:where([class~="not-prose"] *)) {
1097
1056
  margin-top: 2em;
1098
1057
  margin-bottom: 2em;
@@ -1189,151 +1148,6 @@ select {
1189
1148
  margin-bottom: 0;
1190
1149
  }
1191
1150
 
1192
- .prose-sm :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
1193
- margin-top: 0.5714286em;
1194
- margin-bottom: 0.5714286em;
1195
- }
1196
-
1197
- .prose-sm :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
1198
- margin-top: 1.1428571em;
1199
- }
1200
-
1201
- .prose-sm :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
1202
- margin-bottom: 1.1428571em;
1203
- }
1204
-
1205
- .prose-sm :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
1206
- margin-top: 1.1428571em;
1207
- }
1208
-
1209
- .prose-sm :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
1210
- margin-bottom: 1.1428571em;
1211
- }
1212
-
1213
- .prose-sm :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
1214
- margin-top: 0;
1215
- }
1216
-
1217
- .prose-sm :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
1218
- margin-bottom: 0;
1219
- }
1220
-
1221
- .prose-base :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
1222
- margin-top: 0.75em;
1223
- margin-bottom: 0.75em;
1224
- }
1225
-
1226
- .prose-base :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
1227
- margin-top: 1.25em;
1228
- }
1229
-
1230
- .prose-base :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
1231
- margin-bottom: 1.25em;
1232
- }
1233
-
1234
- .prose-base :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
1235
- margin-top: 1.25em;
1236
- }
1237
-
1238
- .prose-base :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
1239
- margin-bottom: 1.25em;
1240
- }
1241
-
1242
- .prose-base :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
1243
- margin-top: 0;
1244
- }
1245
-
1246
- .prose-base :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
1247
- margin-bottom: 0;
1248
- }
1249
-
1250
- .prose-lg :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
1251
- margin-top: 0.8888889em;
1252
- margin-bottom: 0.8888889em;
1253
- }
1254
-
1255
- .prose-lg :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
1256
- margin-top: 1.3333333em;
1257
- }
1258
-
1259
- .prose-lg :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
1260
- margin-bottom: 1.3333333em;
1261
- }
1262
-
1263
- .prose-lg :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
1264
- margin-top: 1.3333333em;
1265
- }
1266
-
1267
- .prose-lg :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
1268
- margin-bottom: 1.3333333em;
1269
- }
1270
-
1271
- .prose-lg :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
1272
- margin-top: 0;
1273
- }
1274
-
1275
- .prose-lg :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
1276
- margin-bottom: 0;
1277
- }
1278
-
1279
- .prose-xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
1280
- margin-top: 0.8em;
1281
- margin-bottom: 0.8em;
1282
- }
1283
-
1284
- .prose-xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
1285
- margin-top: 1.2em;
1286
- }
1287
-
1288
- .prose-xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
1289
- margin-bottom: 1.2em;
1290
- }
1291
-
1292
- .prose-xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
1293
- margin-top: 1.2em;
1294
- }
1295
-
1296
- .prose-xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
1297
- margin-bottom: 1.2em;
1298
- }
1299
-
1300
- .prose-xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
1301
- margin-top: 0;
1302
- }
1303
-
1304
- .prose-xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
1305
- margin-bottom: 0;
1306
- }
1307
-
1308
- .prose-2xl :where(.prose > ul > li p):not(:where([class~="not-prose"] *)) {
1309
- margin-top: 0.8333333em;
1310
- margin-bottom: 0.8333333em;
1311
- }
1312
-
1313
- .prose-2xl :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"] *)) {
1314
- margin-top: 1.3333333em;
1315
- }
1316
-
1317
- .prose-2xl :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"] *)) {
1318
- margin-bottom: 1.3333333em;
1319
- }
1320
-
1321
- .prose-2xl :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"] *)) {
1322
- margin-top: 1.3333333em;
1323
- }
1324
-
1325
- .prose-2xl :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"] *)) {
1326
- margin-bottom: 1.3333333em;
1327
- }
1328
-
1329
- .prose-2xl :where(.prose > :first-child):not(:where([class~="not-prose"] *)) {
1330
- margin-top: 0;
1331
- }
1332
-
1333
- .prose-2xl :where(.prose > :last-child):not(:where([class~="not-prose"] *)) {
1334
- margin-bottom: 0;
1335
- }
1336
-
1337
1151
  .m-0 {
1338
1152
  margin: 0px;
1339
1153
  }
@@ -1348,24 +1162,24 @@ select {
1348
1162
  margin-bottom: 1rem;
1349
1163
  }
1350
1164
 
1351
- .mb-2 {
1352
- margin-bottom: 0.5rem;
1165
+ .\!mb-2 {
1166
+ margin-bottom: 0.5rem !important;
1353
1167
  }
1354
1168
 
1355
- .mt-4 {
1356
- margin-top: 1rem;
1169
+ .\!mt-0 {
1170
+ margin-top: 0px !important;
1357
1171
  }
1358
1172
 
1359
- .mt-0 {
1360
- margin-top: 0px;
1173
+ .mb-2 {
1174
+ margin-bottom: 0.5rem;
1361
1175
  }
1362
1176
 
1363
- .\!mt-0 {
1364
- margin-top: 0px !important;
1177
+ .mt-0 {
1178
+ margin-top: 0px;
1365
1179
  }
1366
1180
 
1367
- .\!mb-2 {
1368
- margin-bottom: 0.5rem !important;
1181
+ .mt-4 {
1182
+ margin-top: 1rem;
1369
1183
  }
1370
1184
 
1371
1185
  .flex {
@@ -1392,14 +1206,14 @@ select {
1392
1206
  table-layout: fixed;
1393
1207
  }
1394
1208
 
1395
- .grid-cols-2 {
1396
- grid-template-columns: repeat(2, minmax(0, 1fr));
1397
- }
1398
-
1399
1209
  .grid-cols-1 {
1400
1210
  grid-template-columns: repeat(1, minmax(0, 1fr));
1401
1211
  }
1402
1212
 
1213
+ .grid-cols-2 {
1214
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1215
+ }
1216
+
1403
1217
  .flex-row {
1404
1218
  flex-direction: row;
1405
1219
  }
@@ -1433,19 +1247,19 @@ select {
1433
1247
  border-color: rgb(229 231 235 / var(--tw-border-opacity));
1434
1248
  }
1435
1249
 
1436
- .border-primary-500 {
1250
+ .border-gray-500 {
1437
1251
  --tw-border-opacity: 1;
1438
- border-color: rgb(205 0 67 / var(--tw-border-opacity));
1252
+ border-color: rgb(107 114 128 / var(--tw-border-opacity));
1439
1253
  }
1440
1254
 
1441
- .border-gray-500 {
1255
+ .border-primary-500 {
1442
1256
  --tw-border-opacity: 1;
1443
- border-color: rgb(107 114 128 / var(--tw-border-opacity));
1257
+ border-color: rgb(205 0 67 / var(--tw-border-opacity));
1444
1258
  }
1445
1259
 
1446
- .bg-gray-200 {
1447
- --tw-bg-opacity: 1;
1448
- background-color: rgb(229 231 235 / var(--tw-bg-opacity));
1260
+ .\!bg-gray-100 {
1261
+ --tw-bg-opacity: 1 !important;
1262
+ background-color: rgb(243 244 246 / var(--tw-bg-opacity)) !important;
1449
1263
  }
1450
1264
 
1451
1265
  .\!bg-gray-200 {
@@ -1453,23 +1267,28 @@ select {
1453
1267
  background-color: rgb(229 231 235 / var(--tw-bg-opacity)) !important;
1454
1268
  }
1455
1269
 
1456
- .\!bg-gray-100 {
1457
- --tw-bg-opacity: 1 !important;
1458
- background-color: rgb(243 244 246 / var(--tw-bg-opacity)) !important;
1270
+ .bg-gray-200 {
1271
+ --tw-bg-opacity: 1;
1272
+ background-color: rgb(229 231 235 / var(--tw-bg-opacity));
1459
1273
  }
1460
1274
 
1461
1275
  .p-20 {
1462
1276
  padding: 5rem;
1463
1277
  }
1464
1278
 
1279
+ .px-12 {
1280
+ padding-left: 3rem;
1281
+ padding-right: 3rem;
1282
+ }
1283
+
1465
1284
  .px-2 {
1466
1285
  padding-left: 0.5rem;
1467
1286
  padding-right: 0.5rem;
1468
1287
  }
1469
1288
 
1470
- .px-8 {
1471
- padding-left: 2rem;
1472
- padding-right: 2rem;
1289
+ .px-24 {
1290
+ padding-left: 6rem;
1291
+ padding-right: 6rem;
1473
1292
  }
1474
1293
 
1475
1294
  .px-4 {
@@ -1477,21 +1296,16 @@ select {
1477
1296
  padding-right: 1rem;
1478
1297
  }
1479
1298
 
1299
+ .px-8 {
1300
+ padding-left: 2rem;
1301
+ padding-right: 2rem;
1302
+ }
1303
+
1480
1304
  .py-2 {
1481
1305
  padding-top: 0.5rem;
1482
1306
  padding-bottom: 0.5rem;
1483
1307
  }
1484
1308
 
1485
- .px-24 {
1486
- padding-left: 6rem;
1487
- padding-right: 6rem;
1488
- }
1489
-
1490
- .px-12 {
1491
- padding-left: 3rem;
1492
- padding-right: 3rem;
1493
- }
1494
-
1495
1309
  .text-center {
1496
1310
  text-align: center;
1497
1311
  }