Skip to content

Commit

Permalink
feat: add vue-gtag plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldshen committed Jan 26, 2020
1 parent 04e0900 commit dd6f016
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 19 deletions.
39 changes: 21 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
# vue-diet

## TODO
[x] commitlint(可参考 create-nuxt-app
[x] 用 github actions 发布到 page
[] github 开通 netlify 做 pr 预览
[] 有 release-log(用 gren
[] 自动打 label
[] readme 有 badge & contributor(如何 add contributor
[] 有 google analytics 统计访客
[] 用 vuetify 复现 diet(以手机端为主,限制最大宽度,在桌面端也有移动端的效果

其他
[![Netlify Status](https://api.netlify.com/api/v1/badges/74a3c931-6a03-4fb7-8931-dcd360e76ba9/deploy-status)](https://app.netlify.com/sites/compassionate-wing-d4bcd6/deploys)
[![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg)](https://github-tools.github.io/github-release-notes/)

## 开发流程

### 开发中
[x] 有 eslint & prettier
[ ] 用 vuetify 复现 diet(以手机端为主,限制最大宽度,在桌面端也有移动端的效果
[x] 有 google analytics 统计访客

### 持续集成
[x] owner 直接推 master
[x] contributor 提交 pr,基于 netlify 预览修正
[x] 有 commitlint 保证 msg 规范
[x] 基于 github flow 协作模式,就是 clone 下来基于 master 提 pr
[x] 合到 master 后 github-action 自动发布到 github-pages
[ ] 自带域名(指向 netlify 还是 github-pages
[ ] 发布成功后通知到邮件、微信

### TODO
[] eslint 插件没注册就用上了?
[] pwa 如何被使用
[] 看 github 其他插件
[] 看 github 其他插件,比如监控代码质量的
[] composition api(等1.0.0再学也不迟
[] typescript(强行上就是折腾

其实就是
1. 开发过程,有 linter 辅助,vuetify 做 ui
2. 开发流程使用 pr 模式,有版本记录
3. 构建发布使用 github action + page
4. 发布成功后通知我的钉钉(最好微信?

## Project setup
```
yarn install
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"dependencies": {
"core-js": "^3.4.3",
"register-service-worker": "^1.6.2",
"vue": "^2.6.10"
"vue": "^2.6.10",
"vue-gtag": "^1.2.0"
},
"devDependencies": {
"@commitlint/cli": "^8.2.0",
Expand Down
4 changes: 4 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import VueGtag from 'vue-gtag'

Vue.use(VueGtag, {
config: {id: 'UA-156897241-1'},
})
Vue.config.productionTip = false

new Vue({
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9084,6 +9084,11 @@ vue-eslint-parser@^5.0.0:
esquery "^1.0.1"
lodash "^4.17.11"

vue-gtag@^1.2.0:
version "1.2.0"
resolved "https://registry.npm.taobao.org/vue-gtag/download/vue-gtag-1.2.0.tgz#88fe9be29dd5959f4df5d47c01c4603829e8d1cf"
integrity sha1-iP6b4p3VlZ9N9dR8AcRgOCno0c8=

vue-hot-reload-api@^2.3.0:
version "2.3.4"
resolved "https://registry.npm.taobao.org/vue-hot-reload-api/download/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"
Expand Down

0 comments on commit dd6f016

Please sign in to comment.