From 84125a6a81886a0414106b84ad118b380614c456 Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Mon, 9 Sep 2024 20:40:38 -0300 Subject: [PATCH] Lint --- README.md | 1 - _WIP_Advanced/Create Your Own Template.md | 4 +-- _WIP_Advanced/Usage Via NodeJS API.md | 5 ++-- _WIP_Configuration Files/Babel.md | 22 +++++++------- _WIP_Configuration Files/PostCSS.md | 1 - _WIP_Configuration Files/_Webpack.md | 2 +- _WIP_Contribute/Architecture Overview.md | 1 - _WIP_Contribute/Help Ensuring Quality.md | 2 +- _WIP_Contribute/Help Me Fixing Stuff.md | 2 +- _WIP_Contribute/Run This Project Locally.md | 2 +- .../What This Project Is All About.md | 2 +- _WIP_Development/_Modern CSS/Less.md | 29 +++++++++---------- _WIP_Development/_Modern CSS/Sass.md | 23 +++++++-------- _WIP_Features/HTML Fields.md | 6 ++-- _WIP_Features/Icon Fields.md | 6 ++-- _WIP_Features/JSON Fields.md | 6 ++-- _WIP_Features/Locales Files.md | 6 ++-- _WIP_Features/Migrating Your Extension.md | 8 ++--- _WIP_Features/Page Reload And HMR.md | 4 +-- _WIP_Features/Script Fields.md | 4 +-- _WIP_Features/Static Assets.md | 6 ++-- _WIP_Features/The Manifest File.md | 6 ++-- _WIP_Features/Web Accessible Resources.md | 6 ++-- _WIP_Integrations/Add To This Page.md | 4 +-- _WIP_Integrations/Authentication.md | 5 ++-- _WIP_Integrations/Stripe.md | 4 +-- _WIP_Integrations/Supabase.md | 4 +-- docs/en/blog/announcing-2-0-0-alpha.mdx | 18 ++++++------ docs/en/blog/index.mdx | 2 +- .../get-started-immediately.mdx | 2 +- docs/en/docs/guides/commands/build.mdx | 9 +++--- docs/en/docs/guides/commands/create.mdx | 6 ++-- docs/en/docs/guides/commands/reference.mdx | 4 +-- docs/en/docs/guides/commands/start.mdx | 7 ++--- .../development/environment-variables.mdx | 2 +- .../development/modern-css/overview.mdx | 10 +++---- .../development/modern-css/stylelint.mdx | 2 +- .../modern-javascript/overview.mdx | 4 +-- rspress.config.ts | 2 +- theme/components/Announcement/index.tsx | 5 +++- theme/components/Landingpage/Hero/index.tsx | 26 ++++++++++------- theme/components/Landingpage/index.tsx | 10 +++---- 42 files changed, 145 insertions(+), 135 deletions(-) diff --git a/README.md b/README.md index 5f2eb1d..a2e434e 100644 --- a/README.md +++ b/README.md @@ -23,4 +23,3 @@ pnpm dev ## License MIT (c) Cezar Augusto and the Extension.js authors. - diff --git a/_WIP_Advanced/Create Your Own Template.md b/_WIP_Advanced/Create Your Own Template.md index f73d881..fe2ad6e 100644 --- a/_WIP_Advanced/Create Your Own Template.md +++ b/_WIP_Advanced/Create Your Own Template.md @@ -1,9 +1,7 @@ --- sort: 1 - --- -TODO ---- +## TODO **🧩 Extension** • create cross-browser extensions with no build configuration. diff --git a/_WIP_Advanced/Usage Via NodeJS API.md b/_WIP_Advanced/Usage Via NodeJS API.md index 281252e..39fab6e 100644 --- a/_WIP_Advanced/Usage Via NodeJS API.md +++ b/_WIP_Advanced/Usage Via NodeJS API.md @@ -1,8 +1,7 @@ --- sort: 3 - ---- -TODO --- +## TODO + **🧩 Extension** • create cross-browser extensions with no build configuration. diff --git a/_WIP_Configuration Files/Babel.md b/_WIP_Configuration Files/Babel.md index 2b89d7f..6a16224 100644 --- a/_WIP_Configuration Files/Babel.md +++ b/_WIP_Configuration Files/Babel.md @@ -8,22 +8,22 @@ To allow developers to use the latest language features without worrying about b Here’s how each Babel plugin and preset contributes to this feature: -* [@babel/plugin-proposal-decorators](https://www.npmjs.com/package/@babel/plugin-proposal-decorators): Allows developers to use decorators in their code, providing a convenient and readable way to annotate and modify classes and properties at design time. -* [@babel/plugin-syntax-dynamic-import](https://www.npmjs.com/package/@babel/plugin-syntax-dynamic-import): Enables the use of dynamic import() syntax, facilitating code-splitting and lazy-loading of modules, which can significantly improve the performance of web applications. -* [@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env): Automatically determines the Babel plugins and polyfills needed based on the target environment's feature support, ensuring that the output code runs efficiently across all platforms. -* [@babel/preset-react](https://www.npmjs.com/package/@babel/preset-react): Transforms JSX into standard JavaScript, making it compatible with the browser and enabling the use of React's powerful UI library and its ecosystem. -* [@babel/preset-typescript](https://www.npmjs.com/package/@babel/preset-typescript): Provides support for TypeScript, allowing developers to leverage type-safe programming, interfaces, and other TypeScript features, which are compiled down to standard JavaScript. -* [babel-plugin-react-require](https://www.npmjs.com/package/babel-plugin-react-require): Automatically injects the React import statement in files that use JSX, ensuring that the React namespace is always available where needed. -* [babel-plugin-transform-react-remove-prop-types](https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types): Removes PropTypes from the production build of React components, reducing the bundle size and improving the performance of the production app. +- [@babel/plugin-proposal-decorators](https://www.npmjs.com/package/@babel/plugin-proposal-decorators): Allows developers to use decorators in their code, providing a convenient and readable way to annotate and modify classes and properties at design time. +- [@babel/plugin-syntax-dynamic-import](https://www.npmjs.com/package/@babel/plugin-syntax-dynamic-import): Enables the use of dynamic import() syntax, facilitating code-splitting and lazy-loading of modules, which can significantly improve the performance of web applications. +- [@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env): Automatically determines the Babel plugins and polyfills needed based on the target environment's feature support, ensuring that the output code runs efficiently across all platforms. +- [@babel/preset-react](https://www.npmjs.com/package/@babel/preset-react): Transforms JSX into standard JavaScript, making it compatible with the browser and enabling the use of React's powerful UI library and its ecosystem. +- [@babel/preset-typescript](https://www.npmjs.com/package/@babel/preset-typescript): Provides support for TypeScript, allowing developers to leverage type-safe programming, interfaces, and other TypeScript features, which are compiled down to standard JavaScript. +- [babel-plugin-react-require](https://www.npmjs.com/package/babel-plugin-react-require): Automatically injects the React import statement in files that use JSX, ensuring that the React namespace is always available where needed. +- [babel-plugin-transform-react-remove-prop-types](https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types): Removes PropTypes from the production build of React components, reducing the bundle size and improving the performance of the production app. This comprehensive setup empowers developers to write modern, efficient, and clean extension code across various modern web technologies, including [[React]] and [[TypeScript]]. ## Next Steps -* Add a custom [[Babel]] config (`babel.config.js`) to your extension. -* To maintain compatibility across diverse browser vendors, see [[Polyfill]]. -* Learn about [[React]] in Extension. -* Learn about [[TypeScript]] in Extension. +- Add a custom [[Babel]] config (`babel.config.js`) to your extension. +- To maintain compatibility across diverse browser vendors, see [[Polyfill]]. +- Learn about [[React]] in Extension. +- Learn about [[TypeScript]] in Extension. --- diff --git a/_WIP_Configuration Files/PostCSS.md b/_WIP_Configuration Files/PostCSS.md index 223f901..dea0859 100644 --- a/_WIP_Configuration Files/PostCSS.md +++ b/_WIP_Configuration Files/PostCSS.md @@ -2,7 +2,6 @@ sort: 3 --- - --- **🧩 Extension** • create cross-browser extensions with no build configuration. diff --git a/_WIP_Configuration Files/_Webpack.md b/_WIP_Configuration Files/_Webpack.md index ec7d665..d08db91 100644 --- a/_WIP_Configuration Files/_Webpack.md +++ b/_WIP_Configuration Files/_Webpack.md @@ -1,7 +1,7 @@ --- sort: 7 - --- + TODO --- diff --git a/_WIP_Contribute/Architecture Overview.md b/_WIP_Contribute/Architecture Overview.md index 178f66d..bdb1356 100644 --- a/_WIP_Contribute/Architecture Overview.md +++ b/_WIP_Contribute/Architecture Overview.md @@ -1,6 +1,5 @@ --- sort: 2 - --- TODO diff --git a/_WIP_Contribute/Help Ensuring Quality.md b/_WIP_Contribute/Help Ensuring Quality.md index 884a5a3..ea44e26 100644 --- a/_WIP_Contribute/Help Ensuring Quality.md +++ b/_WIP_Contribute/Help Ensuring Quality.md @@ -1,7 +1,7 @@ --- sort: 5 - --- + TODO --- diff --git a/_WIP_Contribute/Help Me Fixing Stuff.md b/_WIP_Contribute/Help Me Fixing Stuff.md index de022a0..189427a 100644 --- a/_WIP_Contribute/Help Me Fixing Stuff.md +++ b/_WIP_Contribute/Help Me Fixing Stuff.md @@ -1,7 +1,7 @@ --- sort: 4 - --- + TODO --- diff --git a/_WIP_Contribute/Run This Project Locally.md b/_WIP_Contribute/Run This Project Locally.md index eaa7365..f64b4d8 100644 --- a/_WIP_Contribute/Run This Project Locally.md +++ b/_WIP_Contribute/Run This Project Locally.md @@ -1,7 +1,7 @@ --- sort: 3 - --- + TODO --- diff --git a/_WIP_Contribute/What This Project Is All About.md b/_WIP_Contribute/What This Project Is All About.md index 88091c9..6ea3c35 100644 --- a/_WIP_Contribute/What This Project Is All About.md +++ b/_WIP_Contribute/What This Project Is All About.md @@ -1,7 +1,7 @@ --- sort: 1 - --- + TODO --- diff --git a/_WIP_Development/_Modern CSS/Less.md b/_WIP_Development/_Modern CSS/Less.md index b12b540..a041b10 100644 --- a/_WIP_Development/_Modern CSS/Less.md +++ b/_WIP_Development/_Modern CSS/Less.md @@ -13,7 +13,7 @@ npx extension dev @Extension/templates/less #### In an HTML file ```html - + @@ -24,10 +24,9 @@ npx extension dev @Extension/templates/less -

Hello, Extension.

+

Hello, Extension.

- ``` #### In a JavaScript File @@ -35,12 +34,10 @@ npx extension dev @Extension/templates/less ```js // ./NewTabApp.jsx -import './css/globals.css' - +import "./css/globals.css"; + export default function MyNewTabPage() { - return ( -

Hello, Extension.

- ) + return

Hello, Extension.

; } ``` @@ -50,20 +47,20 @@ export default function MyNewTabPage() { // ./content_script.jsx // There is no HTML in a content_script file, so -// we import our global CSS file via dynamic import. -import('./css/globals.css') - +// we import our global CSS file via dynamic import. +import("./css/globals.css"); + export default function MyNewTabPage() { - return

Hello, Extension!

+ return

Hello, Extension!

; } ``` ## Next Steps -* Learn how to apply styles to the multiple extension contexts in [[Working With Stylesheets]]. -* Learn how to enable [[PostCSS]] capabilities in your extension. -* Configure [[Tailwind]] in your extension. -* Using [[Stylelint]] with Extension to lint your stylesheets. +- Learn how to apply styles to the multiple extension contexts in [[Working With Stylesheets]]. +- Learn how to enable [[PostCSS]] capabilities in your extension. +- Configure [[Tailwind]] in your extension. +- Using [[Stylelint]] with Extension to lint your stylesheets. --- diff --git a/_WIP_Development/_Modern CSS/Sass.md b/_WIP_Development/_Modern CSS/Sass.md index 007390d..31f363e 100644 --- a/_WIP_Development/_Modern CSS/Sass.md +++ b/_WIP_Development/_Modern CSS/Sass.md @@ -14,13 +14,13 @@ From [https://sass-lang.com/](https://sass-lang.com/): -### Try it yourself +### Try it yourself ```sh npx extension dev @Extension/templates/sass ``` -## Usage With An Existing Extension +## Usage With An Existing Extension ### Installation & Configuration @@ -34,7 +34,7 @@ npm install -D sass #### In An HTML File ```html - + @@ -45,10 +45,9 @@ npm install -D sass -

Hello, Extension.

+

Hello, Extension.

- ``` #### In A JavaScript File @@ -57,7 +56,7 @@ npm install -D sass // ./NewTabApp.jsx import styles from './styles/button.module.scss' - + export default function MyNewTabPage({ Component, pageProps }) { return (

Hello, Extension.

@@ -72,9 +71,9 @@ export default function MyNewTabPage({ Component, pageProps }) { // ./content_script.jsx // There is no HTML in a content_script file, so -// we import our global CSS file via dynamic import. +// we import our global CSS file via dynamic import. import('./css/globals.css') - + export default function MyNewTabPage() { return

Hello, Extension!

} @@ -87,7 +86,7 @@ export default function MyNewTabPage() { /* styles/button.module.scss */ $primary-color: #64ff00; - + :export { primaryColor: $primary-color; } @@ -97,7 +96,7 @@ $primary-color: #64ff00; // ./NewTabApp.jsx import styles from './styles/button.module.scss' - + export default function MyNewTabPage({ Component, pageProps }) { return (

Hello, Extension.

@@ -105,11 +104,11 @@ export default function MyNewTabPage({ Component, pageProps }) { } ``` -Now, add `css/button.scss` as an import for the file you want Sass to work. For example: +Now, add `css/button.scss` as an import for the file you want Sass to work. For example: ## Next Steps -* Ensure the semantics and code quality of your CSS files by using [[Stylelint]]. +- Ensure the semantics and code quality of your CSS files by using [[Stylelint]]. --- diff --git a/_WIP_Features/HTML Fields.md b/_WIP_Features/HTML Fields.md index 066037d..65af140 100644 --- a/_WIP_Features/HTML Fields.md +++ b/_WIP_Features/HTML Fields.md @@ -2,7 +2,9 @@ templateEngineOverride: njk,md sort: 2 --- - -TODO \ No newline at end of file + +TODO diff --git a/_WIP_Features/Icon Fields.md b/_WIP_Features/Icon Fields.md index 370658e..3b97253 100644 --- a/_WIP_Features/Icon Fields.md +++ b/_WIP_Features/Icon Fields.md @@ -2,7 +2,9 @@ templateEngineOverride: njk,md sort: 3 --- - -TODO \ No newline at end of file + +TODO diff --git a/_WIP_Features/JSON Fields.md b/_WIP_Features/JSON Fields.md index e361171..2fc2a74 100644 --- a/_WIP_Features/JSON Fields.md +++ b/_WIP_Features/JSON Fields.md @@ -2,7 +2,9 @@ templateEngineOverride: njk,md sort: 6 --- - -TODO \ No newline at end of file + +TODO diff --git a/_WIP_Features/Locales Files.md b/_WIP_Features/Locales Files.md index a072eb5..f66dbf4 100644 --- a/_WIP_Features/Locales Files.md +++ b/_WIP_Features/Locales Files.md @@ -2,7 +2,9 @@ templateEngineOverride: njk,md sort: 7 --- - -TODO \ No newline at end of file + +TODO diff --git a/_WIP_Features/Migrating Your Extension.md b/_WIP_Features/Migrating Your Extension.md index 6ee4dbe..104923d 100644 --- a/_WIP_Features/Migrating Your Extension.md +++ b/_WIP_Features/Migrating Your Extension.md @@ -1,11 +1,11 @@ --- sort: 2 - --- - -TODO ---- + +## TODO **🧩 Extension** • create cross-browser extensions with no build configuration. diff --git a/_WIP_Features/Page Reload And HMR.md b/_WIP_Features/Page Reload And HMR.md index a9b5012..6cbb276 100644 --- a/_WIP_Features/Page Reload And HMR.md +++ b/_WIP_Features/Page Reload And HMR.md @@ -2,8 +2,8 @@ sort: 11 --- - TODO diff --git a/_WIP_Features/Script Fields.md b/_WIP_Features/Script Fields.md index a43aab7..0efdf85 100644 --- a/_WIP_Features/Script Fields.md +++ b/_WIP_Features/Script Fields.md @@ -2,7 +2,7 @@ templateEngineOverride: njk,md sort: 3 --- - - diff --git a/_WIP_Features/Static Assets.md b/_WIP_Features/Static Assets.md index d9c9a29..802761d 100644 --- a/_WIP_Features/Static Assets.md +++ b/_WIP_Features/Static Assets.md @@ -2,7 +2,9 @@ templateEngineOverride: njk,md sort: 5 --- - -TODO \ No newline at end of file + +TODO diff --git a/_WIP_Features/The Manifest File.md b/_WIP_Features/The Manifest File.md index a326ae5..1880a58 100644 --- a/_WIP_Features/The Manifest File.md +++ b/_WIP_Features/The Manifest File.md @@ -2,7 +2,9 @@ templateEngineOverride: njk,md sort: 1 --- - -TODO \ No newline at end of file + +TODO diff --git a/_WIP_Features/Web Accessible Resources.md b/_WIP_Features/Web Accessible Resources.md index f5ffa58..8ec7ec2 100644 --- a/_WIP_Features/Web Accessible Resources.md +++ b/_WIP_Features/Web Accessible Resources.md @@ -2,7 +2,9 @@ templateEngineOverride: njk,md sort: 8 --- - -fonts, csv \ No newline at end of file + +fonts, csv diff --git a/_WIP_Integrations/Add To This Page.md b/_WIP_Integrations/Add To This Page.md index 82e9f8c..4e608d1 100644 --- a/_WIP_Integrations/Add To This Page.md +++ b/_WIP_Integrations/Add To This Page.md @@ -1,7 +1,7 @@ --- sort: 5 --- -TODO ---- + +## TODO **🧩 Extension** • create cross-browser extensions with no build configuration. diff --git a/_WIP_Integrations/Authentication.md b/_WIP_Integrations/Authentication.md index 58fcedd..700294b 100644 --- a/_WIP_Integrations/Authentication.md +++ b/_WIP_Integrations/Authentication.md @@ -1,8 +1,7 @@ --- sort: 4 - ---- -TODO --- +## TODO + **🧩 Extension** • create cross-browser extensions with no build configuration. diff --git a/_WIP_Integrations/Stripe.md b/_WIP_Integrations/Stripe.md index 194964f..fe2ad6e 100644 --- a/_WIP_Integrations/Stripe.md +++ b/_WIP_Integrations/Stripe.md @@ -1,7 +1,7 @@ --- sort: 1 --- -TODO ---- + +## TODO **🧩 Extension** • create cross-browser extensions with no build configuration. diff --git a/_WIP_Integrations/Supabase.md b/_WIP_Integrations/Supabase.md index 76e1e4d..5e911d7 100644 --- a/_WIP_Integrations/Supabase.md +++ b/_WIP_Integrations/Supabase.md @@ -1,7 +1,7 @@ --- sort: 2 --- -TODO ---- + +## TODO **🧩 Extension** • create cross-browser extensions with no build configuration. diff --git a/docs/en/blog/announcing-2-0-0-alpha.mdx b/docs/en/blog/announcing-2-0-0-alpha.mdx index 99075d2..e19924c 100644 --- a/docs/en/blog/announcing-2-0-0-alpha.mdx +++ b/docs/en/blog/announcing-2-0-0-alpha.mdx @@ -1,6 +1,6 @@ # Announcing Extension.js 2.0.0-alpha -> Steptember 9, 2024 +> September 9, 2024 ![](../../../assets/blog/extension-2-0-0-alpha.png) @@ -12,16 +12,16 @@ To me, "very easy" means very low cognitive effort. It means something is famili **Version 2.0.0-alpha** -* 30+ templates for popular JavaScript frameworks, CSS pre-processors, and extension APIs. [View on GitHub](https://github.com/extension-js/extension.js/tree/main/examples). -* Support for adding browser-specific fields in manifest.json that apply only to the target browser, like `{chrome:service_worker: "sw.js"}` -* `extension.config.js` - For advanced users needing access to the compilation process. [See experimental example](https://github.com/extension-js/extension.js/tree/main/examples/content-extension-config). -* Faster compilation thanks to [SWC](https://swc.rs/). -* A revamped documentation site (this one!). -* A new templates site (coming soon). +- 30+ templates for popular JavaScript frameworks, CSS pre-processors, and extension APIs. [View on GitHub](https://github.com/extension-js/extension.js/tree/main/examples). +- Support for adding browser-specific fields in manifest.json that apply only to the target browser, like `{chrome:service_worker: "sw.js"}` +- `extension.config.js` - For advanced users needing access to the compilation process. [See experimental example](https://github.com/extension-js/extension.js/tree/main/examples/content-extension-config). +- Faster compilation thanks to [SWC](https://swc.rs/). +- A revamped documentation site (this one!). +- A new templates site (coming soon). -The alpha release is focused on bug fixes and testing all existing features while we finish the documentation and templates websites. Keep an eye on this blog or follow us on X for future updates. +The alpha release is focused on bug fixes and testing all existing features while we finish the documentation and templates websites. Keep an eye on this blog or follow us on X for future updates. Thanks for reading. Talk soon. Cezar Augusto
-Creator and Lead Developer, Extension.js \ No newline at end of file +Creator and Lead Developer, Extension.js diff --git a/docs/en/blog/index.mdx b/docs/en/blog/index.mdx index a4ca454..e021927 100644 --- a/docs/en/blog/index.mdx +++ b/docs/en/blog/index.mdx @@ -2,4 +2,4 @@ ## [Announcing v2.0.0-alpha](/blog/announcing-2-0-0-alpha) -> Steptember 9, 2024 +> September 9, 2024 diff --git a/docs/en/docs/getting-started/get-started-immediately.mdx b/docs/en/docs/getting-started/get-started-immediately.mdx index 61cc6e9..c52e02d 100644 --- a/docs/en/docs/getting-started/get-started-immediately.mdx +++ b/docs/en/docs/getting-started/get-started-immediately.mdx @@ -1,6 +1,6 @@ import { PackageManagerTabs } from "@theme"; -# 🔥 Get Started Imnmediately +# 🔥 Get Started Immediately Welcome to the fast track of browser extension@latest development with `Extension`! Whether you're looking to prototype quickly or delve into full-scale development, you've made the right choice. Let's get your development environment set up and running in no time. diff --git a/docs/en/docs/guides/commands/build.mdx b/docs/en/docs/guides/commands/build.mdx index dad5531..00049b6 100644 --- a/docs/en/docs/guides/commands/build.mdx +++ b/docs/en/docs/guides/commands/build.mdx @@ -11,10 +11,11 @@ import { PackageManagerTabs } from "@theme"; yarn: "yarn dlx extension@latest build [extension-path | extension-url] [options]", }} /> -**Responsible for building the extension in production mode.** Builds the extension -for production, based on the browser choice. The `build/` folder will include as -many subfolders as the user browser choices. Each subfolder includes the code for -that specific browser, with proper code transforms for each platform. +**Responsible for building the extension in production mode.** Builds the +extension for production, based on the browser choice. The `build/` folder will +include as many subfolders as the user browser choices. Each subfolder includes +the code for that specific browser, with proper code transforms for each +platform. Users can also opt for a different port to run their extensions. Defaults to `:8889`. diff --git a/docs/en/docs/guides/commands/create.mdx b/docs/en/docs/guides/commands/create.mdx index bcce762..f3b2bfa 100644 --- a/docs/en/docs/guides/commands/create.mdx +++ b/docs/en/docs/guides/commands/create.mdx @@ -31,7 +31,7 @@ Users can also opt for a different directory to install their extensions. Defaul /> ## Arguments And Flags -| Flag | Argument | What it does | Defaults to | -| ---------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | -| `[path or name]` | The extension path or name | If a path is defined, loads the local extension. If a name is provided, loads the extension in the current working directory. | `process.cwd()` | +| Flag | Argument | What it does | Defaults to | +| ---------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- | +| `[path or name]` | The extension path or name | If a path is defined, loads the local extension. If a name is provided, loads the extension in the current working directory. | `process.cwd()` | | -t, --template | Name of the template used to bootstrap your extension | Bootstrap your extension using a template | [new](../../getting-started/templates#template-new) | diff --git a/docs/en/docs/guides/commands/reference.mdx b/docs/en/docs/guides/commands/reference.mdx index e05cb08..61bb0e8 100644 --- a/docs/en/docs/guides/commands/reference.mdx +++ b/docs/en/docs/guides/commands/reference.mdx @@ -2,8 +2,8 @@ [Extension](https://github.com/cezaraugusto/extension) comes with a set of commands that can be customized with options. -| command | description | -| --------------------------------- | ----------------------------------------------------------------------------- | +| command | description | +| ---------------------------- | ----------------------------------------------------------------------------- | | [create](../commands/create) | create an extension. | | [dev](../commands/dev) | bundle the extension in a browser and runs the extension in development mode. | | [start](../commands/start) | bundle the extension in a browser and runs the extension in production mode. | diff --git a/docs/en/docs/guides/commands/start.mdx b/docs/en/docs/guides/commands/start.mdx index d2900e6..a24d205 100644 --- a/docs/en/docs/guides/commands/start.mdx +++ b/docs/en/docs/guides/commands/start.mdx @@ -9,9 +9,9 @@ import { PackageManagerTabs } from "@theme"; yarn: "yarn dlx extension@latest dev [extension-path | extension-url] [options]", }} /> -**Responsible for running your extension in `production` mode.** Gets the extension -and bundles in a new browser instance. Browser extension files are watched and live-reloaded -as they change. +**Responsible for running your extension in `production` mode.** Gets the +extension and bundles in a new browser instance. Browser extension files are +watched and live-reloaded as they change. If a URL is provided, `Extension` will download and run the extension in the current working directory and follow the same tasks any other local extension would. _This feature only works for [GitHub](https://github.com) repositories currently_. @@ -33,4 +33,3 @@ Users can also opt for a different port to run their extensions. | [path or url] | The extension path or the remote extension URL | If a path is defined, loads the local extension. If a URL is provided, pulls the extension from remote source and loads it as a local extension | `process.cwd()` | | -p, --port | The port used to serve watched files | Changes the port for the "dev" script | See above | | -b, --browser | The browser that will run the extension | Changes the browser (`chrome`, `edge`, `all`) | "chrome" | - diff --git a/docs/en/docs/guides/development/environment-variables.mdx b/docs/en/docs/guides/development/environment-variables.mdx index 92467fa..0dfcf71 100644 --- a/docs/en/docs/guides/development/environment-variables.mdx +++ b/docs/en/docs/guides/development/environment-variables.mdx @@ -48,4 +48,4 @@ Will output the following: - const helloWorld = process.env.HELLO_WORLD + const helloWorld = "Hello, world!" console.log(helloWorld) -``` \ No newline at end of file +``` diff --git a/docs/en/docs/guides/development/modern-css/overview.mdx b/docs/en/docs/guides/development/modern-css/overview.mdx index 4b7e267..5d10dcb 100644 --- a/docs/en/docs/guides/development/modern-css/overview.mdx +++ b/docs/en/docs/guides/development/modern-css/overview.mdx @@ -8,11 +8,11 @@ In the early days of web development, CSS was challenging due to its limitations In addition to regular `*.css` files, `Extension` also supports the following file extensions and CSS utilities: -| feature name | description | extension | -| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------- | -| [CSS](./css-modules)) | Locally scoped CSS classes. | \*.module.css | -| [Sass](./sass) | Sass is the most mature, stable, and powerful professional grade CSS extension language in the world. | _.sass, _.scss | -| [Less](./less) | Less extends CSS with dynamic behavior such as variables, mixins, operations and functions. | \*.less | +| feature name | description | extension | +| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | -------------- | +| [CSS](./css-modules)) | Locally scoped CSS classes. | \*.module.css | +| [Sass](./sass) | Sass is the most mature, stable, and powerful professional grade CSS extension language in the world. | _.sass, _.scss | +| [Less](./less) | Less extends CSS with dynamic behavior such as variables, mixins, operations and functions. | \*.less | | [Tailwind](./tailwind-css) | First class support for the utility-first CSS framework for rapidly building modern extensions without ever leaving your HTML. | \*.css | ## Next Steps diff --git a/docs/en/docs/guides/development/modern-css/stylelint.mdx b/docs/en/docs/guides/development/modern-css/stylelint.mdx index a8975c4..2572389 100644 --- a/docs/en/docs/guides/development/modern-css/stylelint.mdx +++ b/docs/en/docs/guides/development/modern-css/stylelint.mdx @@ -1,3 +1,3 @@ # Stylelint -TODO \ No newline at end of file +TODO diff --git a/docs/en/docs/guides/development/modern-javascript/overview.mdx b/docs/en/docs/guides/development/modern-javascript/overview.mdx index 09585e0..56cb9a6 100644 --- a/docs/en/docs/guides/development/modern-javascript/overview.mdx +++ b/docs/en/docs/guides/development/modern-javascript/overview.mdx @@ -6,8 +6,8 @@ To allow developers to use the latest language features without worrying about b In addition to regular `*.js` files, `Extension` also supports the following file extensions: -| feature name | description | extension | -| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- | ------------------- | +| feature name | description | extension | +| ------------------------------------------ | ----------------------------------------------------------------------------------------- | ------------------- | | [ECMAScript Modules](./ecmascript-modules) | ECMAScript modules are the official standard format to package JavaScript code for reuse. | _.js, _.mjs | | [TypeScript](./typescript) | TypeScript is JavaScript with syntax for types. | _.ts, _.tsx, \*.mts | | [React](./react) | React is the library for web and native user interfaces. | \*.jsx | diff --git a/rspress.config.ts b/rspress.config.ts index 172904e..3508038 100644 --- a/rspress.config.ts +++ b/rspress.config.ts @@ -93,7 +93,7 @@ export default defineConfig({ text: "📝 Edit this page on GitHub", }, searchPlaceholderText: "Search Documentation", - } + }, ], }, plugins: [ diff --git a/theme/components/Announcement/index.tsx b/theme/components/Announcement/index.tsx index 7429884..538723b 100644 --- a/theme/components/Announcement/index.tsx +++ b/theme/components/Announcement/index.tsx @@ -19,6 +19,7 @@ function CloseIcon() { stroke-linejoin="round" className="lucide lucide-x text-background w-4 h-4" > + Close icon @@ -27,7 +28,7 @@ function CloseIcon() { export function Announcement() { const [disable, setDisable] = useState( - window.localStorage.getItem(LOCAL_STORAGE_KEY) ?? false + window.localStorage.getItem(LOCAL_STORAGE_KEY) ?? false, ); const { page } = usePageData(); const lang = useLang(); @@ -66,10 +67,12 @@ export function Announcement() { stroke-linejoin="round" className="lucide lucide-chevron-right w-3 h-3 ml-1 opacity-70" > + Chevron right @@ -91,10 +94,11 @@ const Hero = memo(() => { rel="noreferrer" > + GitHub icon + /> {" "} {t("starOnGitHub")} diff --git a/theme/components/Landingpage/index.tsx b/theme/components/Landingpage/index.tsx index b3b585f..2a72152 100644 --- a/theme/components/Landingpage/index.tsx +++ b/theme/components/Landingpage/index.tsx @@ -1,11 +1,11 @@ import Hero from "./Hero"; const LandingPage = () => { - return ( -
- -
- ); + return ( +
+ +
+ ); }; export default LandingPage;