extension-develop 3.0.0-next.62 → 3.0.0-next.67
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/README.md +56 -16
- package/dist/content-script-wrapper.js +34 -11
- package/dist/extension-js-theme/chrome/manifest.json +68 -0
- package/dist/extension-js-theme/chromium/manifest.json +68 -0
- package/dist/extension-js-theme/edge/manifest.json +68 -0
- package/dist/extension-js-theme/firefox/manifest.json +6 -0
- package/dist/main-world-bridge.js +97 -0
- package/dist/minimum-script-file.js +24 -0
- package/dist/module.js +2305 -1137
- package/dist/warn-no-default-export.js +5 -1
- package/package.json +10 -6
|
@@ -80,7 +80,11 @@ function warn_no_default_export(source) {
|
|
|
80
80
|
for (const contentScriptJs of contentScriptJsList)declaredContentJsAbsPaths.push(external_path_default().resolve(projectPath, contentScriptJs));
|
|
81
81
|
}
|
|
82
82
|
const isDeclaredContentScript = declaredContentJsAbsPaths.some((abs)=>resourceAbsPath === external_path_default().normalize(abs));
|
|
83
|
-
|
|
83
|
+
const scriptsDir = external_path_default().resolve(projectPath, "scripts");
|
|
84
|
+
const relToScripts = external_path_default().relative(scriptsDir, resourceAbsPath);
|
|
85
|
+
const isScriptsFolderScript = relToScripts && !relToScripts.startsWith('..') && !external_path_default().isAbsolute(relToScripts);
|
|
86
|
+
const isContentScriptLike = isDeclaredContentScript || isScriptsFolderScript;
|
|
87
|
+
if (isContentScriptLike) {
|
|
84
88
|
const hasDefault = /export\s+default\s+/m.test(source);
|
|
85
89
|
if (!hasDefault) {
|
|
86
90
|
var _compilation___extjsWarnedDefaultExport;
|
package/package.json
CHANGED
|
@@ -21,13 +21,17 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"name": "extension-develop",
|
|
24
|
-
"version": "3.0.0-next.
|
|
25
|
-
"description": "
|
|
24
|
+
"version": "3.0.0-next.67",
|
|
25
|
+
"description": "Develop, build, preview, and package Extension.js projects.",
|
|
26
26
|
"author": {
|
|
27
27
|
"name": "Cezar Augusto",
|
|
28
28
|
"email": "boss@cezaraugusto.net",
|
|
29
29
|
"url": "https://cezaraugusto.com"
|
|
30
30
|
},
|
|
31
|
+
"homepage": "https://github.com/extension-js/extension.js/tree/main/programs/develop#readme",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/extension-js/extension.js/issues"
|
|
34
|
+
},
|
|
31
35
|
"publishConfig": {
|
|
32
36
|
"access": "public",
|
|
33
37
|
"registry": "https://registry.npmjs.org"
|
|
@@ -72,13 +76,13 @@
|
|
|
72
76
|
"browser-extension-manifest-fields": "^2.2.1",
|
|
73
77
|
"case-sensitive-paths-webpack-plugin": "^2.4.0",
|
|
74
78
|
"chokidar": "^4.0.1",
|
|
75
|
-
"chrome-location2": "
|
|
76
|
-
"chromium-location": "
|
|
79
|
+
"chrome-location2": "4.0.0",
|
|
80
|
+
"chromium-location": "2.0.0",
|
|
77
81
|
"content-security-policy-parser": "^0.6.0",
|
|
78
82
|
"cross-spawn": "^7.0.6",
|
|
79
83
|
"dotenv": "^16.4.7",
|
|
80
|
-
"edge-location": "
|
|
81
|
-
"firefox-location2": "
|
|
84
|
+
"edge-location": "2.2.0",
|
|
85
|
+
"firefox-location2": "3.0.0",
|
|
82
86
|
"go-git-it": "^5.0.0",
|
|
83
87
|
"ignore": "^6.0.2",
|
|
84
88
|
"loader-utils": "^3.3.1",
|