extension-create 2.0.0-rc.28 → 2.0.0-rc.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.
package/dist/module.d.ts
CHANGED
|
@@ -3,4 +3,8 @@ export interface CreateOptions {
|
|
|
3
3
|
install?: boolean;
|
|
4
4
|
cliVersion?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare function extensionCreate(projectNameInput: string | undefined, { cliVersion, template, install }:
|
|
6
|
+
export declare function extensionCreate(projectNameInput: string | undefined, { cliVersion, template, install, }: {
|
|
7
|
+
cliVersion?: string;
|
|
8
|
+
template?: string;
|
|
9
|
+
install?: boolean;
|
|
10
|
+
}): Promise<void>;
|
package/dist/module.js
CHANGED
|
@@ -271,18 +271,6 @@ async function createDirectory(projectPath, projectName) {
|
|
|
271
271
|
process.exit(1);
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
const import_local_template_filename = (0, external_url_namespaceObject.fileURLToPath)(__rslib_import_meta_url__);
|
|
275
|
-
const import_local_template_dirname = external_path_namespaceObject.dirname(import_local_template_filename);
|
|
276
|
-
async function importLocalTemplate(projectPath, projectName, template) {
|
|
277
|
-
const localTemplatePath = external_path_namespaceObject.resolve(import_local_template_dirname, 'template');
|
|
278
|
-
try {
|
|
279
|
-
console.log(installingFromTemplate(projectName, template));
|
|
280
|
-
await copyDirectoryWithSymlinks(localTemplatePath, projectPath);
|
|
281
|
-
} catch (error) {
|
|
282
|
-
console.error(installingFromTemplateError(projectName, template, error));
|
|
283
|
-
process.exit(1);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
274
|
const external_go_git_it_namespaceObject = require("go-git-it");
|
|
287
275
|
var external_go_git_it_default = /*#__PURE__*/ __webpack_require__.n(external_go_git_it_namespaceObject);
|
|
288
276
|
const import_external_template_filename = (0, external_url_namespaceObject.fileURLToPath)(__rslib_import_meta_url__);
|
|
@@ -570,8 +558,7 @@ async function extensionCreate(projectNameInput, { cliVersion, template = 'init'
|
|
|
570
558
|
const projectName = external_path_namespaceObject.basename(projectPath);
|
|
571
559
|
try {
|
|
572
560
|
await createDirectory(projectPath, projectName);
|
|
573
|
-
|
|
574
|
-
else await importExternalTemplate(projectPath, projectName, template);
|
|
561
|
+
await importExternalTemplate(projectPath, projectName, template);
|
|
575
562
|
await overridePackageJson(projectPath, projectName, {
|
|
576
563
|
template,
|
|
577
564
|
cliVersion
|
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.30",
|
|
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",
|
|
54
54
|
"test:create": "vitest run",
|
|
55
55
|
"test:coverage": "vitest run --coverage"
|
|
56
56
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function importLocalTemplate(projectPath: string, projectName: string, template: string): Promise<void>;
|
package/dist/template/README.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
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).
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
}
|