create-addfox-app 0.1.1-beta.12 → 0.1.1-beta.13

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/cli.js CHANGED
@@ -496,16 +496,6 @@ function applyTestAndReportSetup(root, language, selection) {
496
496
  }
497
497
  }
498
498
  const RESET = "\x1b[0m";
499
- const ORANGE = [
500
- 255,
501
- 118,
502
- 38
503
- ];
504
- const PINK = [
505
- 255,
506
- 92,
507
- 186
508
- ];
509
499
  const LOGO_LINES = [
510
500
  " █████╗ ██████╗ ██████╗ ███████╗ ██████╗ ██╗ ██╗",
511
501
  "██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔═══██╗╚██╗██╔╝",
@@ -514,13 +504,15 @@ const LOGO_LINES = [
514
504
  "██║ ██║██████╔╝██████╔╝██║ ╚██████╔╝██╔╝ ██╗",
515
505
  "╚═╝ ╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝"
516
506
  ];
517
- function lerpChannel(a, b, t) {
518
- return Math.round(a + (b - a) * t);
507
+ const GRADIENT_START_256 = 208;
508
+ const GRADIENT_END_256 = 213;
509
+ function shouldEmitAnsiColor() {
510
+ return !process.env.NO_COLOR;
519
511
  }
520
- function rgbFg(r, g, b) {
521
- return `\x1b[38;2;${r};${g};${b}m`;
512
+ function ansi256Fg(code) {
513
+ return `\x1b[38;5;${code}m`;
522
514
  }
523
- function colorizeLine(line) {
515
+ function colorizeLineAnsi256(line) {
524
516
  const len = line.length;
525
517
  if (0 === len) return "";
526
518
  let out = "";
@@ -531,16 +523,20 @@ function colorizeLine(line) {
531
523
  continue;
532
524
  }
533
525
  const t = len <= 1 ? 0 : i / (len - 1);
534
- const r = lerpChannel(ORANGE[0], PINK[0], t);
535
- const g = lerpChannel(ORANGE[1], PINK[1], t);
536
- const b = lerpChannel(ORANGE[2], PINK[2], t);
537
- out += rgbFg(r, g, b) + ch;
526
+ const code = Math.round(GRADIENT_START_256 + t * (GRADIENT_END_256 - GRADIENT_START_256));
527
+ out += ansi256Fg(code) + ch;
538
528
  }
539
529
  return out + RESET;
540
530
  }
531
+ function printPlainLogo() {
532
+ console.log("");
533
+ for (const line of LOGO_LINES)console.log(line);
534
+ console.log("");
535
+ }
541
536
  function printAddfoxLogo() {
537
+ if (!shouldEmitAnsiColor()) return void printPlainLogo();
542
538
  console.log("");
543
- for (const line of LOGO_LINES)console.log(colorizeLine(line));
539
+ for (const line of LOGO_LINES)console.log(colorizeLineAnsi256(line));
544
540
  console.log("");
545
541
  }
546
542
  const SKIP_STYLE_ENTRIES = new Set([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-addfox-app",
3
- "version": "0.1.1-beta.12",
3
+ "version": "0.1.1-beta.13",
4
4
  "description": "Interactive scaffolder for addfox extension projects",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,12 +8,11 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "preact": "^10.29.0"
15
13
  },
16
14
  "devDependencies": {
15
+ "addfox": "^0.1.1-beta.7",
17
16
  "@rsbuild/plugin-preact": "^1.7.2"
18
17
  }
19
18
  }
@@ -8,12 +8,11 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "preact": "^10.29.0"
15
13
  },
16
14
  "devDependencies": {
15
+ "addfox": "^0.1.1-beta.7",
17
16
  "@rsbuild/plugin-preact": "^1.7.2",
18
17
  "typescript": "^5.9.3",
19
18
  "@types/chrome": "^0.1.38"
@@ -8,13 +8,12 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "react": "^19.2.4",
15
13
  "react-dom": "^19.2.4"
16
14
  },
17
15
  "devDependencies": {
16
+ "addfox": "^0.1.1-beta.7",
18
17
  "@rsbuild/plugin-react": "^1.4.6"
19
18
  }
20
19
  }
@@ -8,13 +8,12 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "react": "^19.2.4",
15
13
  "react-dom": "^19.2.4"
16
14
  },
17
15
  "devDependencies": {
16
+ "addfox": "^0.1.1-beta.7",
18
17
  "@rsbuild/plugin-react": "^1.4.6",
19
18
  "typescript": "^5.9.3",
20
19
  "@types/chrome": "^0.1.38",
@@ -8,12 +8,11 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "solid-js": "^1.9.11"
15
13
  },
16
14
  "devDependencies": {
15
+ "addfox": "^0.1.1-beta.7",
17
16
  "@rsbuild/plugin-babel": "^1.1.2",
18
17
  "@rsbuild/plugin-solid": "^1.1.1"
19
18
  }
@@ -8,12 +8,11 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "solid-js": "^1.9.11"
15
13
  },
16
14
  "devDependencies": {
15
+ "addfox": "^0.1.1-beta.7",
17
16
  "@rsbuild/plugin-babel": "^1.1.2",
18
17
  "@rsbuild/plugin-solid": "^1.1.1",
19
18
  "typescript": "^5.9.3",
@@ -8,12 +8,11 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "svelte": "^5.54.1"
15
13
  },
16
14
  "devDependencies": {
15
+ "addfox": "^0.1.1-beta.7",
17
16
  "@rsbuild/plugin-svelte": "^1.1.1"
18
17
  }
19
18
  }
@@ -8,12 +8,11 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "svelte": "^5.54.1"
15
13
  },
16
14
  "devDependencies": {
15
+ "addfox": "^0.1.1-beta.7",
17
16
  "@rsbuild/plugin-svelte": "^1.1.1",
18
17
  "typescript": "^5.9.3",
19
18
  "@types/chrome": "^0.1.38"
@@ -7,9 +7,7 @@
7
7
  "dev": "addfox dev",
8
8
  "build": "addfox build"
9
9
  },
10
- "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3"
13
- },
14
- "devDependencies": {}
10
+ "devDependencies": {
11
+ "addfox": "^0.1.1-beta.7"
12
+ }
15
13
  }
@@ -7,11 +7,8 @@
7
7
  "dev": "addfox dev",
8
8
  "build": "addfox build"
9
9
  },
10
- "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3"
13
- },
14
10
  "devDependencies": {
11
+ "addfox": "^0.1.1-beta.7",
15
12
  "typescript": "^5.9.3"
16
13
  }
17
14
  }
@@ -1,5 +1,5 @@
1
1
  import { defineConfig } from "addfox";
2
- import vue from "@addfox/rsbuild-plugin-vue";
2
+ import { pluginVue } from "@rsbuild/plugin-vue";
3
3
 
4
4
  const manifest = {
5
5
  name: "My Extension",
@@ -23,5 +23,5 @@ const manifest = {
23
23
 
24
24
  export default defineConfig({
25
25
  manifest: { chromium: manifest, firefox: { ...manifest } },
26
- plugins: [vue()],
26
+ plugins: [pluginVue()],
27
27
  });
@@ -8,13 +8,11 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "vue": "^3.5.30"
15
13
  },
16
14
  "devDependencies": {
17
- "@addfox/rsbuild-plugin-vue": "^0.1.1-beta.5",
15
+ "addfox": "^0.1.1-beta.7",
18
16
  "@rsbuild/plugin-vue": "^1.2.7"
19
17
  }
20
18
  }
@@ -1,5 +1,5 @@
1
1
  import { defineConfig } from "addfox";
2
- import vue from "@addfox/rsbuild-plugin-vue";
2
+ import { pluginVue } from "@rsbuild/plugin-vue";
3
3
 
4
4
  const manifest = {
5
5
  name: "My Extension",
@@ -23,5 +23,5 @@ const manifest = {
23
23
 
24
24
  export default defineConfig({
25
25
  manifest: { chromium: manifest, firefox: { ...manifest } },
26
- plugins: [vue()],
26
+ plugins: [pluginVue()],
27
27
  });
@@ -8,15 +8,12 @@
8
8
  "build": "addfox build"
9
9
  },
10
10
  "dependencies": {
11
- "addfox": "^0.1.1-beta.7",
12
- "@rsbuild/core": "^1.7.3",
13
11
  "@addfox/utils": "^0.1.1-beta.5",
14
12
  "vue": "^3.5.30"
15
13
  },
16
14
  "devDependencies": {
17
- "@addfox/rsbuild-plugin-vue": "^0.1.1-beta.5",
15
+ "addfox": "^0.1.1-beta.7",
18
16
  "@rsbuild/plugin-vue": "^1.2.7",
19
- "@rsbuild/plugin-vue-jsx": "^1.1.2",
20
17
  "typescript": "^5.9.3",
21
18
  "@types/chrome": "^0.1.38"
22
19
  }