mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-01-24 06:33:52 +01:00
refs #850 Fix types and main.ts for typescript compile
This commit is contained in:
parent
c42ba283a2
commit
490bb3b2ac
@ -65,13 +65,13 @@ let rendererConfig = {
|
||||
{
|
||||
test: /\.ts$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
appendTsSuffixTo: [/\.vue$/]
|
||||
},
|
||||
include: [
|
||||
path.resolve('../node_modules/vue-awesome')
|
||||
]
|
||||
// include: path.join(__dirname , '../node_modules/vue-awesome'),
|
||||
use: {
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
appendTsSuffixTo: [/\.vue$/]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
@ -89,6 +89,8 @@ let rendererConfig = {
|
||||
options: {
|
||||
extractCSS: process.env.NODE_ENV === 'production',
|
||||
loaders: {
|
||||
js: 'ts-loader',
|
||||
ts: 'ts-loader',
|
||||
sass: 'vue-style-loader!css-loader!sass-loader?indentedSyntax=1',
|
||||
scss: 'vue-style-loader!css-loader!sass-loader',
|
||||
less: 'vue-style-loader!css-loader!less-loader'
|
||||
|
14
package-lock.json
generated
14
package-lock.json
generated
@ -557,20 +557,20 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-2.2.1.tgz",
|
||||
"integrity": "sha512-JAMFhOaHIciYVh8fb5/83nmuO/AHwmto+Hq7a9y8FzLDcC1KCU344XDOMEmahnrTFlHjgh4L0WJFczNIX2GxnQ==",
|
||||
"requires": {
|
||||
"@types/node": "8.10.21"
|
||||
"@types/node": "11.11.4"
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "8.10.21",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.21.tgz",
|
||||
"integrity": "sha512-87XkD9qDXm8fIax+5y7drx84cXsu34ZZqfB7Cial3Q/2lxSoJ/+DRaWckkCbxP41wFSIrrb939VhzaNxj4eY1w=="
|
||||
"version": "11.11.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.4.tgz",
|
||||
"integrity": "sha512-02tIL+QIi/RW4E5xILdoAMjeJ9kYq5t5S2vciUdFPXv/ikFTb0zK8q9vXkg4+WAJuYXGiVT1H28AkD2C+IkXVw=="
|
||||
},
|
||||
"@types/oauth": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/oauth/-/oauth-0.9.1.tgz",
|
||||
"integrity": "sha512-a1iY62/a3yhZ7qH7cNUsxoI3U/0Fe9+RnuFrpTKr+0WVOzbKlSLojShCKe20aOD1Sppv+i8Zlq0pLDuTJnwS4A==",
|
||||
"requires": {
|
||||
"@types/node": "8.10.21"
|
||||
"@types/node": "11.11.4"
|
||||
}
|
||||
},
|
||||
"@types/request": {
|
||||
@ -580,7 +580,7 @@
|
||||
"requires": {
|
||||
"@types/caseless": "0.12.1",
|
||||
"@types/form-data": "2.2.1",
|
||||
"@types/node": "8.10.21",
|
||||
"@types/node": "11.11.4",
|
||||
"@types/tough-cookie": "2.3.5"
|
||||
}
|
||||
},
|
||||
@ -595,7 +595,7 @@
|
||||
"integrity": "sha512-ldteZwWIgl9cOy7FyvYn+39Ah4+PfpVE72eYKw75iy2L0zTbhbcwvzeJ5IOu6DQP93bjfXq0NGHY6FYtmYoqFQ==",
|
||||
"requires": {
|
||||
"@types/events": "3.0.0",
|
||||
"@types/node": "8.10.21"
|
||||
"@types/node": "11.11.4"
|
||||
}
|
||||
},
|
||||
"@vue/component-compiler-utils": {
|
||||
|
@ -152,6 +152,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mapbox/stylelint-processor-arbitrary-tags": "^0.2.0",
|
||||
"@types/node": "^11.11.4",
|
||||
"@vue/test-utils": "^1.0.0-beta.28",
|
||||
"ajv": "^6.6.1",
|
||||
"babel-core": "^6.26.3",
|
||||
|
@ -1,5 +1,4 @@
|
||||
import Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
import ElementUI from 'element-ui'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
import locale from 'element-ui/lib/locale/lang/en'
|
||||
@ -17,6 +16,15 @@ import router from './router'
|
||||
import store from './store'
|
||||
import i18next from '~/src/config/i18n'
|
||||
|
||||
declare function require(x: string): any
|
||||
|
||||
declare var process: {
|
||||
env: {
|
||||
NODE_ENV: string,
|
||||
IS_WEB: boolean
|
||||
}
|
||||
}
|
||||
|
||||
Vue.use(ElementUI, { locale })
|
||||
Vue.use(shortkey)
|
||||
Vue.use(VueI18Next)
|
||||
@ -26,7 +34,6 @@ Vue.component('popper', Popper)
|
||||
sync(store, router)
|
||||
|
||||
if (!process.env.IS_WEB) Vue.use(require('vue-electron'))
|
||||
Vue.http = Vue.prototype.$http = axios
|
||||
Vue.config.productionTip = false
|
||||
|
||||
const i18n = new VueI18Next(i18next)
|
||||
|
@ -1,13 +1,13 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Basic Options */
|
||||
"target": "es2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
||||
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
|
||||
"module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
|
||||
"lib": ["es6"], /* Specify library files to be included in the compilation. */
|
||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||
"allowJs": true, /* Allow javascript files to be compiled. */
|
||||
// "checkJs": true, /* Report errors in .js files. */
|
||||
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
||||
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||
"sourceMap": true, /* Generates corresponding '.map' file. */
|
||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||
|
1
types/vue-popperjs.d.ts
vendored
Normal file
1
types/vue-popperjs.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
declare module 'vue-popperjs'
|
1
types/vue-shortkey.d.ts
vendored
Normal file
1
types/vue-shortkey.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
declare module 'vue-shortkey'
|
4
types/vue.d.ts
vendored
Normal file
4
types/vue.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare module "*.vue" {
|
||||
import Vue from 'vue'
|
||||
export default Vue
|
||||
}
|
Loading…
Reference in New Issue
Block a user