Skip to content

Commit fcbc960

Browse files
authored
chore: update examples, add a script to regenerate them (Kocal#399)
```bash ./generate-examples.sh ```
1 parent 688a2d5 commit fcbc960

24 files changed

+4142
-3737
lines changed

examples/full-airbnb/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Project: Full AirBnb
1+
# Project: full-airbnb
22

3-
This project has been generated with `vue init kocal/vue-web-extension full-airbnb` command, following [full-airbnb scenario](../../scenarios/full-airbnb.json).
3+
This project has been generated with `vue init kocal/vue-web-extension .` command, following [full-airbnb scenario](../../scenarios/minimal.json).

examples/full-airbnb/package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "full-airbnb",
33
"version": "1.0.0",
4-
"description": "A Vue.js web extension",
5-
"author": "Hugo Alliaume <[email protected]>",
4+
"description": "Extension generated with Kocal/vue-web-extension",
5+
"author": "Travis",
66
"license": "MIT",
77
"scripts": {
88
"lint": "eslint --ext .js,.vue src",
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"axios": "^0.18.0",
20-
"vue": "^2.5.17",
20+
"vue": "^2.6.10",
2121
"vue-router": "^3.0.1",
2222
"vuex": "^3.0.1",
2323
"webextension-polyfill": "^0.3.1"
@@ -34,15 +34,15 @@
3434
"cross-env": "^5.2.0",
3535
"css-loader": "^0.28.11",
3636
"ejs": "^2.6.1",
37-
"eslint": "^5.7.0",
37+
"eslint": "^5.16.0",
3838
"eslint-config-airbnb-base": "^13.0.0",
3939
"eslint-config-prettier": "^3.1.0",
4040
"eslint-friendly-formatter": "^4.0.1",
4141
"eslint-import-resolver-webpack": "^0.10.1",
42-
"eslint-loader": "^2.1.1",
43-
"eslint-plugin-import": "^2.12.0",
44-
"eslint-plugin-prettier": "^3.0.0",
45-
"eslint-plugin-vue": "^5.0.0-beta.3",
42+
"eslint-loader": "^2.1.2",
43+
"eslint-plugin-import": "^2.16.0",
44+
"eslint-plugin-prettier": "^3.0.1",
45+
"eslint-plugin-vue": "^5.2.2",
4646
"file-loader": "^1.1.11",
4747
"husky": "^0.14.3",
4848
"mini-css-extract-plugin": "^0.4.4",
@@ -51,11 +51,10 @@
5151
"prettier": "^1.14.3",
5252
"sass-loader": "^7.1.0",
5353
"vue-loader": "^15.4.2",
54-
"vue-template-compiler": "^2.5.17",
54+
"vue-template-compiler": "^2.6.10",
5555
"web-ext-types": "^2.1.0",
5656
"webpack": "^4.20.2",
5757
"webpack-chrome-extension-reloader": "^0.8.3",
58-
"webpack-cli": "^3.1.2",
59-
"webpack-shell-plugin": "^0.5.0"
58+
"webpack-cli": "^3.1.2"
6059
}
6160
}

examples/full-airbnb/scripts/remove-evals.js

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

examples/full-airbnb/src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "full-airbnb",
3-
"description": "A Vue.js web extension",
3+
"description": "Extension generated with Kocal/vue-web-extension",
44
"version": null,
55
"manifest_version": 2,
66
"icons": {

examples/full-airbnb/src/popup/popup.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import router from './router';
55

66
global.browser = require('webextension-polyfill');
77

8+
Vue.prototype.$browser = global.browser;
9+
810
/* eslint-disable no-new */
911
new Vue({
1012
el: '#app',

examples/full-airbnb/webpack.config.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const webpack = require('webpack');
22
const ejs = require('ejs');
33
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4-
const WebpackShellPlugin = require('webpack-shell-plugin');
54
const CopyWebpackPlugin = require('copy-webpack-plugin');
65
const ChromeExtensionReloader = require('webpack-chrome-extension-reloader');
76
const { VueLoaderPlugin } = require('vue-loader');
@@ -55,6 +54,9 @@ const config = {
5554
],
5655
},
5756
plugins: [
57+
new webpack.DefinePlugin({
58+
global: 'window',
59+
}),
5860
new VueLoaderPlugin(),
5961
new MiniCssExtractPlugin({
6062
filename: '[name].css',
@@ -78,9 +80,6 @@ const config = {
7880
},
7981
},
8082
]),
81-
new WebpackShellPlugin({
82-
onBuildEnd: ['node scripts/remove-evals.js'],
83-
}),
8483
],
8584
};
8685

0 commit comments

Comments
 (0)