Skip to content

Commit

Permalink
vue-class-component test
Browse files Browse the repository at this point in the history
plus some bug fixes
  • Loading branch information
tinyAdapter committed Aug 21, 2018
1 parent da4f1c0 commit 0a86a2b
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"modules": false
}],
"stage-0"
]
],
"plugins": ["transform-decorators-legacy"]
},
"web": {
"presets": [
Expand All @@ -34,6 +35,5 @@
"stage-0"
]
}
},
"plugins": ["transform-runtime"]
}
}
36 changes: 34 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
"babel-eslint": "^7.2.3",
"babel-loader": "^7.1.1",
"babel-plugin-istanbul": "^4.1.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-0": "^6.24.1",
Expand Down Expand Up @@ -107,11 +109,14 @@
"ts-loader": "^3.5.0",
"typescript": "^3.0.1",
"url-loader": "^0.5.9",
"vue-class-component": "^6.2.0",
"vue-devtools": "^4.1.4",
"vue-html-loader": "^1.2.4",
"vue-loader": "^13.0.5",
"vue-property-decorator": "^7.0.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.4.2",
"vuex-class": "^0.3.1",
"webpack": "^3.5.2",
"webpack-dev-server": "^2.7.1",
"webpack-hot-middleware": "^2.18.2",
Expand Down
18 changes: 8 additions & 10 deletions src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,23 @@
</template>

<script>
import Vue from 'vue'
import Component from 'vue-class-component'
import GtAppSidebar from '@/components/AppSidebar'
import { ipcRenderer } from 'electron'
import ipcTypes from '../common/ipcTypes'
export default {
name: 'main-page',
@Component({
components: {
GtAppSidebar
},
computed: {
},
methods: {
},
}
})
export default class App extends Vue {
mounted() {
ipcRenderer.send(ipcTypes.REQUEST_CONFIG, 'default')
},
}
}
</script>

Expand Down
18 changes: 17 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
{
"compilerOptions": {
// 是否包含可以用于 debug 的 sourceMap
"sourceMap": true,
// 以严格模式解析
"strict": false,
// 编译输出目标 ES 版本
"target": "es5",
// 启用装饰器
"experimentalDecorators": true,
// 启用设计类型元数据(用于反射)
"emitDecoratorMetadata": true,
// 在表达式和声明上有隐含的any类型时报错
"noImplicitAny": false,
"target": "es5"
// 不是函数的所有返回路径都有返回值时报错。
"noImplicitReturns": true,
// 编译过程中打印文件名
"listFiles": true,
// 移除注释
"removeComments": true,
"suppressImplicitAnyIndexErrors": true,
},
"include": [
"src/**/*"
Expand Down

0 comments on commit 0a86a2b

Please sign in to comment.