extension-create 2.0.0-rc.30 → 2.0.0-rc.32
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/lib/utils.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export declare function moveDirectoryContents(source: string, destination: strin
|
|
|
4
4
|
export declare function getInstallCommand(): Promise<string>;
|
|
5
5
|
export declare function getTemplatePath(workingDir: string): string;
|
|
6
6
|
export declare function isDirectoryWriteable(directory: string, projectName: string): Promise<boolean>;
|
|
7
|
-
export declare function isExternalTemplate(
|
|
7
|
+
export declare function isExternalTemplate(_templateName: string): boolean;
|
|
8
8
|
export declare function isTypeScriptTemplate(templateName: string): boolean;
|
package/dist/module.d.ts
CHANGED
|
@@ -3,8 +3,4 @@ export interface CreateOptions {
|
|
|
3
3
|
install?: boolean;
|
|
4
4
|
cliVersion?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function extensionCreate(projectNameInput: string | undefined, { cliVersion, template, install
|
|
7
|
-
cliVersion?: string;
|
|
8
|
-
template?: string;
|
|
9
|
-
install?: boolean;
|
|
10
|
-
}): Promise<void>;
|
|
6
|
+
export declare function extensionCreate(projectNameInput: string | undefined, { cliVersion, template, install }: CreateOptions): Promise<void>;
|
package/dist/module.js
CHANGED
|
@@ -237,8 +237,8 @@ async function isDirectoryWriteable(directory, projectName) {
|
|
|
237
237
|
return false;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
function isExternalTemplate(
|
|
241
|
-
return
|
|
240
|
+
function isExternalTemplate(_templateName) {
|
|
241
|
+
return true;
|
|
242
242
|
}
|
|
243
243
|
function isTypeScriptTemplate(templateName) {
|
|
244
244
|
return templateName.includes("typescript") || templateName.includes('react') || templateName.includes('preact') || templateName.includes('svelte') || templateName.includes('solid');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function importLocalTemplate(projectPath: string, projectName: string, template: string): Promise<void>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# [projectName]
|
|
2
|
+
|
|
3
|
+
> [templateDescription]
|
|
4
|
+
|
|
5
|
+
## Available Scripts
|
|
6
|
+
|
|
7
|
+
In the project directory, you can run the following scripts:
|
|
8
|
+
|
|
9
|
+
### [runCommand] dev
|
|
10
|
+
|
|
11
|
+
**Development Mode**: This command runs your extension in development mode. It will launch a new browser instance with your extension loaded. The page will automatically reload whenever you make changes to your code, allowing for a smooth development experience.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
[runCommand] dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### [runCommand] start
|
|
18
|
+
|
|
19
|
+
**Production Preview**: This command runs your extension in production mode. It will launch a new browser instance with your extension loaded, simulating the environment and behavior of your extension as it will appear once published.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
[runCommand] start
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### [runCommand] build
|
|
26
|
+
|
|
27
|
+
**Build for Production**: This command builds your extension for production. It optimizes and bundles your extension, preparing it for deployment to the target browser's store.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
[runCommand] build
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Learn More
|
|
34
|
+
|
|
35
|
+
To learn more about creating cross-browser extensions with Extension.js, visit the [official documentation](https://extension.js.org).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"license": "MIT",
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "https://github.com/extension-js/extension.git",
|
|
6
|
+
"directory": "examples/init"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"name": "init",
|
|
10
|
+
"description": "An Extension.js example.",
|
|
11
|
+
"version": "0.0.1",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"extension",
|
|
14
|
+
"browser-extension",
|
|
15
|
+
"web-extension",
|
|
16
|
+
"template"
|
|
17
|
+
]
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"name": "extension-create",
|
|
24
|
-
"version": "2.0.0-rc.
|
|
24
|
+
"version": "2.0.0-rc.32",
|
|
25
25
|
"description": "The create step of Extension.js",
|
|
26
26
|
"author": {
|
|
27
27
|
"name": "Cezar Augusto",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"scripts": {
|
|
51
51
|
"clean": "rm -rf dist",
|
|
52
52
|
"watch": "rslib build --watch",
|
|
53
|
-
"compile": "rslib build",
|
|
53
|
+
"compile": "rslib build && bash install_scripts.sh",
|
|
54
54
|
"test:create": "vitest run",
|
|
55
55
|
"test:coverage": "vitest run --coverage"
|
|
56
56
|
}
|