Skip to content

Commit ba5f432

Browse files
authored
Vue CLI 3+ preset (#622)
vue-web-extension now becomes a Vue-CLI 3+ preset!
1 parent 5d1fd96 commit ba5f432

File tree

133 files changed

+194
-20895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+194
-20895
lines changed

.appveyor.yml

Lines changed: 0 additions & 104 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 118 deletions
This file was deleted.

README.md

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,24 @@
33
[![Build Status (Travis)](https://travis-ci.org/Kocal/vue-web-extension.svg?branch=master)](https://travis-ci.org/Kocal/vue-web-extension)
44
[![Build Status (AppVeyor)](https://ci.appveyor.com/api/projects/status/huaoxwvqcoyx2x08/branch/master?svg=true)](https://ci.appveyor.com/project/Kocal/vue-web-extension/branch/master)
55

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).
77

8-
- Boilerplate for `manifest.json` and `background.js` files, and for `icons` / `popup` folders
9-
- [Vue](https://github.com/vuejs/vue)
10-
- [Vue-router](https://github.com/vuejs/vue-router) (configurable)
11-
- [Vuex](https://github.com/vuejs/vuex) (configurable)
8+
---
9+
10+
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)
13+
- [Vue 2+](https://github.com/vuejs/vue)
14+
- [Vue-router](https://github.com/vuejs/vue-router) and [Vuex](https://github.com/vuejs/vuex)
1215
- [Axios](https://github.com/axios/axios) (configurable)
13-
- [Webpack 4](https://github.com/webpack/webpack)
1416
- [Babel](https://github.com/babel/babel) with [preset-env](https://github.com/babel/babel/tree/master/packages/babel-preset-env)
15-
- [ESLint](https://github.com/eslint/eslint) (configurable)
16-
- [Prettier](https://github.com/prettier/prettier) (configurable)
17-
- 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)
2118

2219
## Requirements
2320

2421
- Node.js >= 10 and npm >= 5
2522
- [git](https://git-scm.com)
26-
- [vue-cli 2](https://github.com/vuejs/vue-cli/tree/v2)
23+
- [vue-cli 3+](https://github.com/vuejs/vue-cli)
2724

2825
## Documentation
2926

@@ -32,33 +29,24 @@ The documentation can be found on [vue-web-extension.netlify.app](https://vue-we
3229
## Usage
3330

3431
```bash
35-
$ vue init kocal/vue-web-extension my-extension
32+
$ vue create --preset kocal/vue-web-extension my-extension
3633
$ cd my-extension
37-
$ npm install
3834
$ npm run build
3935
```
4036

4137
### `npm run build`
4238

4339
Build the extension into `dist` folder for **production**.
4440

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.
5242

53-
### `npm run watch:dev`
43+
### `npm run serve`
5444

55-
Watch for modifications then run `npm run build:dev`.
5645

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.
5847

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.
6049

61-
### `npm run build-zip`
50+
## Options
6251

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

docs/.vuepress/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
title: 'Vue Web-Extension - A Web-Extension Boilerplate for VueJS',
2+
title: 'Vue Web-Extension - A Web-Extension preset for VueJS',
33
description: '🛠️ A boilerplate for quickly starting a web extension with Vue, webpack 4, ESLint and more!',
44

55
plugins: {

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
home: true
3-
heroText: Vue Web-Extension Boilerplate
4-
tagline: A boilerplate for quickly starting a web extension with Vue, webpack 4, ESLint and more!
3+
heroText: Vue Web-Extension Preset
4+
tagline: A Vue CLI preset for quickly starting a web extension with webpack, Vue and more!
55
actionText: Get Started →
66
actionLink: /intro/setup.html
77
features:
@@ -10,6 +10,6 @@ features:
1010
- title: Ready-To-Go
1111
details: The Vue-Web-Extension boilerplate gives you everything you need to get started quickly
1212
- title: Fast Development
13-
details: With Vuex, Vue Router, and Axois prepared you can start directly to developing
13+
details: With Vuex, Vue Router, and Axios prepared you can start directly to developing
1414
footer: MIT Licensed | Copyright © 2018-present Hugo Alliaume
1515
---

0 commit comments

Comments
 (0)