Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 2.54 KB

README_zh.md

File metadata and controls

81 lines (55 loc) · 2.54 KB

Create Chrome Extension (.crx)

crx-preview

OSCS Status npm npm-download GitHub Language Count npm publish

Chrome 插件生成器,支持多种框架模板!

  • 🚀 敏捷的热更能力(采用 Vite2)
  • 🥡 开箱即用
  • 🌈 多种前端框架支撑 (9+)
  • 🥢 支撑 TypeScript 以及 JavaScript
  • 🌗 明亮以及暗黑模式

EN · 中文

安装

Node >= 14.18.0

# 使用 npm create 命令
λ npm create chrome-ext

# 或者使用 npx 命令
λ npx create-chrome-ext

# 或者使用 npm init 命令
λ npm init chrome-ext

用例

您还可以通过其他命令行配置直接指定项目名称和要使用的模板。比如 Vite + Svelte 项目,运行:

# npm 6.x
λ npm create chrome-ext@latest my-crx-app --template svelte-js

# npm 版本 7 以上, 注意 -- 命令选项
λ npm create chrome-ext@latest my-crx-app -- --template react-ts

# or yarn
λ yarn create chrome-ext my-crx-app --template vue-ts

# or pnpm
λ pnpm create chrome-ext my-crx-app --template vanilla-ts

You can also generator the project with crx cli, run:

λ npm install create-chrome-ext --global

# and then
λ crx my-crx-app
# or
λ crx my-crx-app --template preact-js
# or use create-chrome-exe (global env)
λ create-chrome-ext my-crx-app

模板

预置的前端架构:

React · Vue · Svelte · Preact · Solid · Alpine · Lit · Inferno · Stencil · Vanilla

语言支持:

JavaScript · TypeScript

预览

crx-run crx-install crx-build