Skip to content

Commit 229f699

Browse files
authored
chore: re-generate examples (Kocal#264)
* fix: remove empty lines when « options » is inactive * chore(example): re-generate « minimal » example * chore(example): re-generate « full » example * chore(example): re-generate « full-airbnb » example * chore(examples): remove old .pretierc files * chore(examples): fix README
1 parent d0ceec3 commit 229f699

Some content is hidden

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

47 files changed

+1142
-906
lines changed
File renamed without changes.

examples/full-airbnb/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Project: Full AirBnb
22

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

examples/full-airbnb/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"author": "Hugo Alliaume <[email protected]>",
66
"scripts": {
77
"lint": "eslint --ext .js,.vue src",
8+
"precommit": "precise-commits",
89
"prettier": "prettier 'src/**/*.{js,vue}'",
910
"prettier:write": "npm run prettier -- --write",
1011
"build": "cross-env NODE_ENV=production webpack --hide-modules",
@@ -23,6 +24,7 @@
2324
"@babel/core": "^7.0.0-beta.51",
2425
"@babel/plugin-proposal-optional-chaining": "^7.0.0-beta.51",
2526
"@babel/preset-env": "^7.0.0-beta.51",
27+
"@types/chrome": "^0.0.69",
2628
"babel-eslint": "^8.2.5",
2729
"babel-loader": "^8.0.0-beta.4",
2830
"copy-webpack-plugin": "^4.0.1",
@@ -38,8 +40,10 @@
3840
"eslint-plugin-prettier": "^2.6.1",
3941
"eslint-plugin-vue": "^4.5.0",
4042
"file-loader": "^1.1.11",
43+
"husky": "^0.14.3",
4144
"mini-css-extract-plugin": "^0.4.0",
4245
"node-sass": "^4.5.3",
46+
"precise-commits": "^1.0.2",
4347
"prettier": "^1.13.5",
4448
"sass-loader": "^7.0.1",
4549
"vue-loader": "^15.2.0",

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const fs = require('fs');
66
const BUNDLE_DIR = path.join(__dirname, '../dist');
77
const bundles = [
88
'background.js',
9-
'popup/popup.js'
9+
'popup/popup.js',
10+
'options/options.js',
1011
];
1112

1213
const evalRegexForProduction = /;([a-z])=function\(\){return this}\(\);try{\1=\1\|\|Function\("return this"\)\(\)\|\|\(0,eval\)\("this"\)}catch\(t\){"object"==typeof window&&\(\1=window\)}/g;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import store from "./store";
1+
import store from './store';
22

33
alert(`Hello ${store.getters.foo}!`);

examples/full-airbnb/src/manifest.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@
1515
"scripts": [
1616
"background.js"
1717
]
18+
},
19+
"options_ui": {
20+
"page": "options/options.html",
21+
"chrome_style": true
1822
}
1923
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<template>
2+
<div>
3+
<p>Hello world!</p>
4+
</div>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: 'App',
10+
};
11+
</script>
12+
13+
<style scoped>
14+
p {
15+
font-size: 20px;
16+
}
17+
</style>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>full-airbnb - Options</title>
6+
<link rel="stylesheet" href="options.css">
7+
</head>
8+
<body>
9+
<div id="app"></div>
10+
<script src="options.js"></script>
11+
</body>
12+
</html>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import Vue from 'vue';
2+
import App from './App';
3+
4+
/* eslint-disable no-new */
5+
new Vue({
6+
el: '#app',
7+
render: h => h(App),
8+
});

examples/full-airbnb/src/popup/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
export default {
99
data() {
1010
return {};
11-
}
11+
},
1212
};
1313
</script>

0 commit comments

Comments
 (0)