You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-29Lines changed: 17 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,27 +3,24 @@
3
3
[](https://travis-ci.org/Kocal/vue-web-extension)
4
4
[](https://ci.appveyor.com/project/Kocal/vue-web-extension/branch/master)
5
5
6
-
This template allows you to quickly start a web extension containing:
6
+
:warning:This README is for the master version of the preset. If you use the v1 of this boilerplate with Vue-CLI 2 support, please see [`v1` branch](https://github.com/Kocal/vue-web-extension/tree/v1).
7
7
8
-
- Boilerplate for `manifest.json` and `background.js` files, and for `icons` / `popup` folders
This Vue CLI preset allows you to quickly start a web extension containing:
11
+
12
+
- Everything you need to build a web extension (`manifest.json`, `.zip` building, ...), thanks to [adambullmer/vue-cli-plugin-browser-extension](https://github.com/adambullmer/vue-cli-plugin-browser-extension)
-[Babel](https://github.com/babel/babel) with [preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env)
- A git precommit hook for running Prettier by using [pretty-quick](https://github.com/azz/pretty-quick) or [precise-commits](https://github.com/nrwl/precise-commits) (configurable)
18
-
- CSS extraction, with [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin)
19
-
- Compliable with the **C**ontent **S**ecurity **P**olicy of Chrome and Firefox web stores (some usages [`eval`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) are removed)
20
-
- A script to package your extension into a `.zip` file
17
+
-[ESLint](https://github.com/eslint/eslint) and [Prettier](https://github.com/prettier/prettier) (both configurable)
Build the extension into `dist` folder for **production**.
44
40
45
-
### `npm run build:dev`
46
-
47
-
Build the extension into `dist` folder for **development**.
48
-
49
-
### `npm run watch`
50
-
51
-
Watch for modifications then run `npm run build`.
41
+
A zip file is also built and is located in `artifacts` directory.
52
42
53
-
### `npm run watch:dev`
43
+
### `npm run serve`
54
44
55
-
Watch for modifications then run `npm run build:dev`.
56
45
57
-
It also enable [Hot Module Reloading](https://webpack.js.org/concepts/hot-module-replacement), thanks to [webpack-extension-reloader](https://github.com/rubenspgcavalcante/webpack-extension-reloader) plugin.
46
+
Build the extension for **development** and watch over file changes.
58
47
59
-
:warning: Keep in mind that HMR only works for your **background** entry.
48
+
It also automatically reload your extension into your browsers, thanks to [webpack-extension-reloader](https://github.com/rubenspgcavalcante/webpack-extension-reloader) plugin.
60
49
61
-
### `npm run build-zip`
50
+
##Options
62
51
63
-
Build a zip file following this format `<name>-v<version>.zip`, by reading `name` and `version` from `manifest.json` file.
64
-
Zip file is located in `dist-zip` folder.
52
+
See https://github.com/adambullmer/vue-cli-plugin-browser-extension#plugin-options
0 commit comments