@pantoken/cli 0.1.28 → 0.1.30

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.
Files changed (2) hide show
  1. package/dist/index.mjs +12 -2
  2. package/package.json +22 -14
package/dist/index.mjs CHANGED
@@ -3,7 +3,6 @@ import { dirname, join, relative, resolve } from "node:path";
3
3
  import { generateAndroid } from "@pantoken/android";
4
4
  import { generateCompose } from "@pantoken/compose";
5
5
  import { generateFlutter } from "@pantoken/flutter";
6
- import { buildIconFont } from "@pantoken/icon-font";
7
6
  import { buildPendoCss } from "@pantoken/pendo";
8
7
  import { toDrupalTheme } from "@pantoken/drupal";
9
8
  import { toHugoAssets } from "@pantoken/hugo";
@@ -240,8 +239,19 @@ function runSwatches(args) {
240
239
  else throw new Error(`Unknown swatch format "${format}". Use ase, gpl, sketch, or svg.`);
241
240
  console.log(`✓ pantoken: wrote ${file}`);
242
241
  }
243
- /** Build and write the icon font (TTF, WOFF2, CSS, and codepoints). */
242
+ /**
243
+ * Build and write the icon font (TTF, WOFF2, CSS, and codepoints).
244
+ *
245
+ * `@pantoken/icon-font` is an optional peer — it pulls native build tooling (ttf2woff2 → node-gyp)
246
+ * that most `generate` targets never need, so it's loaded lazily and only on this path.
247
+ */
244
248
  async function runIconFont(args) {
249
+ let buildIconFont;
250
+ try {
251
+ ({buildIconFont} = await import("@pantoken/icon-font"));
252
+ } catch {
253
+ throw new Error("The \"icon-font\" target requires @pantoken/icon-font. Install it with: npm install @pantoken/icon-font");
254
+ }
245
255
  const font = await buildIconFont({
246
256
  theme: args.theme,
247
257
  icons: args.icons,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pantoken/cli",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "pantoken generate <target> — emit native design-token source (Swift now; Kotlin/Dart/Drupal to follow).",
5
5
  "homepage": "https://pantoken.app",
6
6
  "bugs": "https://github.com/thedannywahl/pantoken/issues",
@@ -28,29 +28,37 @@
28
28
  "provenance": true
29
29
  },
30
30
  "dependencies": {
31
- "@pantoken/android": "0.1.18",
32
- "@pantoken/compose": "0.1.18",
33
- "@pantoken/drupal": "0.1.25",
34
- "@pantoken/flutter": "0.1.18",
35
- "@pantoken/hugo": "0.1.25",
36
- "@pantoken/icon-font": "0.1.17",
37
- "@pantoken/jekyll": "0.1.25",
38
- "@pantoken/mintlify": "0.1.14",
31
+ "@pantoken/android": "0.1.19",
32
+ "@pantoken/compose": "0.1.19",
33
+ "@pantoken/drupal": "0.1.27",
34
+ "@pantoken/flutter": "0.1.19",
35
+ "@pantoken/hugo": "0.1.27",
36
+ "@pantoken/jekyll": "0.1.27",
37
+ "@pantoken/mintlify": "0.1.15",
39
38
  "@pantoken/model": "0.3.2",
40
- "@pantoken/pendo": "0.3.14",
41
- "@pantoken/rust": "0.1.16",
42
- "@pantoken/swatches": "0.1.14",
43
- "@pantoken/swift": "0.1.18",
44
- "@pantoken/tokens": "0.3.1",
39
+ "@pantoken/pendo": "0.3.16",
40
+ "@pantoken/rust": "0.1.17",
41
+ "@pantoken/swatches": "0.1.15",
42
+ "@pantoken/swift": "0.1.19",
43
+ "@pantoken/tokens": "0.3.2",
45
44
  "@pantoken/vanilla": "0.1.13",
46
45
  "@pantoken/wordpress": "0.1.13"
47
46
  },
48
47
  "devDependencies": {
48
+ "@pantoken/icon-font": "0.1.18",
49
49
  "@types/node": "^26.5.0",
50
50
  "typescript": "^7.0.2",
51
51
  "vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
52
52
  "vite-plus": "0.3.1"
53
53
  },
54
+ "peerDependencies": {
55
+ "@pantoken/icon-font": "0.1.18"
56
+ },
57
+ "peerDependenciesMeta": {
58
+ "@pantoken/icon-font": {
59
+ "optional": true
60
+ }
61
+ },
54
62
  "engines": {
55
63
  "node": ">=22.18.0"
56
64
  },