@dword-design/base-config-web-extension 4.0.0 → 4.0.2

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.js +22 -6
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import packageName from "depcheck-package-name";
7
7
  import endent from "endent";
8
8
  import fs from "fs-extra";
9
9
  import { stringify as stringifyIni } from "ini";
10
+ import outputFiles from "output-files";
10
11
  import dev from "./dev.js";
11
12
  import lint from "./lint.js";
12
13
  import prepublishOnly from "./prepublish-only.js";
@@ -14,11 +15,16 @@ import typecheck from "./typecheck.js";
14
15
  export default defineBaseConfig(function () {
15
16
  return {
16
17
  allowedMatches: Object.keys({
18
+ ".wxtrc": true,
17
19
  assets: true,
18
20
  components: true,
19
21
  entrypoints: true,
20
22
  "index.spec.ts": true,
21
- public: true
23
+ modules: true,
24
+ public: true,
25
+ utils: true,
26
+ "web-ext.config.ts": true,
27
+ "wxt.config.ts": true
22
28
  }),
23
29
  commands: {
24
30
  dev: {
@@ -80,11 +86,21 @@ export default defineBaseConfig(function () {
80
86
  }, {
81
87
  run: "git archive --output=dist/firefox-sources.zip HEAD"
82
88
  }],
83
- prepare: () => Promise.all([fs.ensureDir(pathLib.join(this.cwd, "userdata")), fs.outputFile(pathLib.join(this.cwd, ".wxtrc"), stringifyIni({
84
- modules: [packageName`@wxt-dev/module-vue`],
85
- outDir: "dist",
86
- outDirTemplate: "{{browser}}"
87
- }))]),
89
+ prepare: () => Promise.all([fs.ensureDir(pathLib.join(this.cwd, "userdata")), outputFiles(this.cwd, {
90
+ ".wxtrc": stringifyIni({
91
+ modules: [packageName`@wxt-dev/module-vue`],
92
+ outDir: "dist",
93
+ outDirTemplate: "{{browser}}"
94
+ }),
95
+ "web-ext.config.ts": endent`
96
+ import { defineWebExtConfig } from 'wxt';
97
+
98
+ export default defineWebExtConfig({
99
+ keepProfileChanges: true,
100
+ chromiumProfile: 'userdata', // chromiumArgs: ['--user-data-dir=userdata'] doesn't keep sessions across dev restarts
101
+ });\n
102
+ `
103
+ })]),
88
104
  readmeInstallString: endent`
89
105
  ## Recommended setup
90
106
  * Node.js 20.11.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dword-design/base-config-web-extension",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "repository": "dword-design/base-config-web-extension",
5
5
  "funding": "https://github.com/sponsors/dword-design",
6
6
  "license": "MIT",
@@ -42,6 +42,7 @@
42
42
  "fs-extra": "^11.3.0",
43
43
  "ini": "^5.0.0",
44
44
  "lodash-es": "^4.17.21",
45
+ "output-files": "^3.0.0",
45
46
  "publish-browser-extension": "^2.3.1",
46
47
  "wxt": "npm:@dword-design/wxt-fork@^0.0.2"
47
48
  },
@@ -53,8 +54,7 @@
53
54
  "@types/ini": "^4.1.1",
54
55
  "@types/lodash-es": "^4.17.12",
55
56
  "express": "^5.1.0",
56
- "get-port": "^7.1.0",
57
- "output-files": "^3.0.0"
57
+ "get-port": "^7.1.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "depcheck": "*"