Socket
Book a DemoInstallSign in
Socket

dn-template-react-chrome-extension

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dn-template-react-chrome-extension

A template for building chrome extension with mota.

latest
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

dn-template-react-chrome-extension

一个用于 dawn 工程化工具的极简模板,使用 React 构建用户 chrome 浏览器插件。

技术栈说明

默认使用 mota 管理数据流,使用 styled-components 管理样式。 其中模板只提供了最简的项目文件及目录,数据流和样式管理方案可根据喜好自行修改。

起步

使用这个模板需要先安装好 Dawn

初始化

mkdir demo && cd demo
dn init -t react-chrome-extension

通过如上命令便可以完成项目的初始化

开发

dn dev

构建

dn build

调试

打开 chrome://extensions/ 加载未打包的插件,选择 build 目录即可。

调试 popup.html

把下面网址中的id部分替换为你的扩展程序id即可,直接在浏览器中打开 chrome-extension://{id}/popup.html

tips: background 页需要手动刷新应用更改

FAQs

Package last updated on 11 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts