chore(tauri.js): Resolve eslint errors (#648)

This commit is contained in:
Rajiv Shah
2020-06-09 21:09:43 -04:00
committed by GitHub
parent 626cffbbc9
commit a4b291e44c
3 changed files with 5 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ import { appDir, tauriDir } from '../helpers/app-paths'
import { TauriConfig } from './../types/config'
import { CargoToml } from './../types/cargo'
import nonWebpackRequire from '../helpers/non-webpack-require'
import { version } from '../../package.json'
interface DirInfo {
path: string
@@ -160,7 +161,7 @@ module.exports = () => {
printInfo({ key: ' Node.js', value: chalk.green(process.version.slice(1)) })
printInfo({
key: ' tauri.js',
value: chalk.green((require('../../package.json') as { version: string }).version)
value: chalk.green(version)
})
printInfo({ key: 'Rust environment', section: true })
printInfo({

View File

@@ -28,6 +28,7 @@ import { appDir, tauriDir } from '../helpers/app-paths'
import logger from '../helpers/logger'
import * as settings from '../helpers/tauricon.config'
import chalk from 'chalk'
import { version } from '../../package.json'
const log = logger('app:spawn')
const warn = logger('app:spawn', chalk.red)
@@ -182,7 +183,7 @@ const tauricon = (exports.tauricon = {
return typeof image === 'object'
},
version: function() {
return require('../../package.json').version
return version
},
make: async function(
src: string = path.resolve(appDir, 'app-icon.png'),

View File

@@ -6,6 +6,7 @@
"target": "es5",
"allowJs": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"moduleResolution": "node",
"baseUrl": ".",
"paths": {