extension 3.0.0-next.8 → 3.0.0

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 CHANGED
@@ -1,26 +1,28 @@
1
1
  [npm-version-image]: https://img.shields.io/npm/v/extension.svg?color=0971fe
2
2
  [npm-version-url]: https://www.npmjs.com/package/extension
3
- [action-image]: https://github.com/extension-js/extension.js/actions/workflows/ci.yml/badge.svg?branch=main&color=2ecc40
3
+ [npm-downloads-image]: https://img.shields.io/npm/dm/extension.svg?color=0971fe
4
+ [npm-downloads-url]: https://www.npmjs.com/package/extension
5
+ [action-image]: https://github.com/extension-js/extension.js/actions/workflows/ci.yml/badge.svg?branch=main&color=0971fe
4
6
  [action-url]: https://github.com/extension-js/extension.js/actions
5
- [discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=2ecc40
7
+ [discord-image]: https://img.shields.io/discord/1253608412890271755?label=Discord&logo=discord&style=flat&color=0971fe
6
8
  [discord-url]: https://discord.gg/v9h2RgeTSN
7
- [snyk-image]: https://snyk.io/test/github/extension-js/extension/badge.svg?color=2ecc40
9
+ [snyk-image]: https://snyk.io/test/github/extension-js/extension/badge.svg?color=0971fe
8
10
  [snyk-url]: https://snyk.io/test/github/extension-js/extension
9
11
 
10
- > The cross-browser extension framework
12
+ # Extension.js [![Version][npm-version-image]][npm-version-url] [![Downloads][npm-downloads-image]][npm-downloads-url] [![workflow][action-image]][action-url] [![discord][discord-image]][discord-url]
11
13
 
12
- # Extension.js [![Version][npm-version-image]][npm-version-url] [![workflow][action-image]][action-url] [![discord][discord-image]][discord-url]
14
+ > The cross-browser extension framework
13
15
 
14
16
  <img alt="Logo" align="right" src="https://avatars.githubusercontent.com/u/172809806" width="15.5%" />
15
17
 
16
- - [Create A New Extension](#create-a-new-extension) — How to create a new extension.
17
- - [Get Started Immediately](#get-started-immediately) — Get work done in no time.
18
- - [Start From An Example](https://github.com/extension-js/extension.js/tree/main/examples) — Start with your favorite tool.
19
- - [I have An Extension](#i-have-an-extension) — Use only specific parts of Extension.js.
18
+ - [Create a new extension](#create-a-new-extension) — How to create a new extension.
19
+ - [Watch demo](#watch-demo) — See how creating a new extension works.
20
+ - [Start from an example](https://github.com/extension-js/extension.js/tree/main/examples) — Start from a working baseline.
21
+ - [I have an extension](#i-have-an-extension) — Use only specific parts of Extension.js.
20
22
 
21
- Extension.js makes it very easy to develop cross-browser extensions.<br />Developers prefer it for its fast builds, unified interface, and zero configuration setup.
23
+ Create cross-browser extensions with no build configuration.<br />Use Extension.js to develop, build, and preview across browsers with a unified workflow.
22
24
 
23
- ## Create A New Extension
25
+ ## Create a new extension
24
26
 
25
27
  Use the `create` command to generate a new extension. Also works with pnpm, yarn, and bun.
26
28
 
@@ -30,11 +32,11 @@ cd my-extension
30
32
  npm run dev
31
33
  ```
32
34
 
33
- ### Watch Demo
35
+ ### Watch demo
34
36
 
35
- https://github.com/cezaraugusto/extension/assets/4672033/7263d368-99c4-434f-a60a-72c489672586
37
+ [Watch demo](https://github.com/cezaraugusto/extension/assets/4672033/7263d368-99c4-434f-a60a-72c489672586)
36
38
 
37
- ## Web Standards and Framework Support
39
+ ## Web standards and framework support
38
40
 
39
41
  <!-- For a preview of extensions running these technologies, see the [templates](https://templates.extension.land) website. -->
40
42
 
@@ -46,15 +48,18 @@ https://github.com/cezaraugusto/extension/assets/4672033/7263d368-99c4-434f-a60a
46
48
 
47
49
  </div>
48
50
 
49
- ## Get Started Immediately
51
+ <details>
52
+ <summary>Get started from a sample</summary>
53
+
54
+ ## Get started
50
55
 
51
56
  Start developing an extension using a sample from Chrome Extension Samples
52
57
 
53
58
  See the example below where we request the sample [page-redder](https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/functional-samples/sample.page-redder) from [Google Chrome Extension Samples](https://github.com/GoogleChrome/chrome-extensions-samples).
54
59
 
55
- ### Watch Demo
60
+ ### Watch demo
56
61
 
57
- https://github.com/cezaraugusto/extension/assets/4672033/ee221a94-6ec7-4e04-8553-8812288927f1
62
+ [Watch demo](https://github.com/cezaraugusto/extension/assets/4672033/ee221a94-6ec7-4e04-8553-8812288927f1)
58
63
 
59
64
  ### Try Yourself
60
65
 
@@ -64,13 +69,13 @@ npx extension@latest dev https://github.com/GoogleChrome/chrome-extensions-sampl
64
69
 
65
70
  </details>
66
71
 
67
- ## I have An Extension
72
+ ## I have an extension
68
73
 
69
74
  If you have an existing extension which is using a package manager, you can install the Extension.js package and manually create the scripts used to run your extension.
70
75
 
71
- ### See How It Works
76
+ ### See how it works
72
77
 
73
- https://github.com/cezaraugusto/extension/assets/4672033/48694a23-b7f1-4098-9c5d-eff49983739c
78
+ [See how it works](https://github.com/cezaraugusto/extension/assets/4672033/48694a23-b7f1-4098-9c5d-eff49983739c)
74
79
 
75
80
  **Step 1 - Install extension as a `devDependency`**
76
81
 
@@ -133,7 +138,7 @@ npx extension@latest dev --gecko-binary "/Applications/Firefox.app/Contents/MacO
133
138
  <div align="center">
134
139
  <p>
135
140
  <span style="font-size:21px; color:black;">Browser testing via</span><br>
136
- <a href="https://www.lambdatest.com/?utm_source=extensionjs&utm_medium=sponsor" target="_blank">
141
+ <a href="https://www.lambdatest.com/?utm_source=extensionjs&utm_medium=sponsor" target="_blank" rel="noopener noreferrer">
137
142
  <img src="https://www.lambdatest.com/blue-logo.png" width="250" height="45" alt="LambdaTest Logo" />
138
143
  </a>
139
144
  </p>
@@ -7,6 +7,15 @@ export declare const fmt: {
7
7
  block(title: string, rows: Array<[string, string]>): string;
8
8
  truncate(input: unknown, max?: number): string;
9
9
  };
10
+ export declare const commandDescriptions: {
11
+ readonly create: "Creates a new extension from a template (React, TypeScript, Vue, Svelte, etc.)";
12
+ readonly dev: "Starts the development server with hot reloading";
13
+ readonly start: "Builds and starts the extension in production mode";
14
+ readonly preview: "Previews the extension in production mode without building";
15
+ readonly build: "Builds the extension for packaging/distribution";
16
+ readonly cleanup: "Cleans up orphaned instances and frees unused ports";
17
+ };
18
+ export declare function unhandledError(err: unknown): string;
10
19
  export declare function updateFailed(err: any): string;
11
20
  export declare function checkUpdates(packageJson: Record<string, any>, update: {
12
21
  latest: string;