Skip to content

Commit

Permalink
doc: upgrade build 22
Browse files Browse the repository at this point in the history
  • Loading branch information
imsunhao committed Aug 22, 2019
1 parent 40311e7 commit 98ebe36
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 45 deletions.
3 changes: 1 addition & 2 deletions doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"src"
],
"dependencies": {
"@bestminr/build": "1.6.18",
"@bestminr/build": "^1.6.22",
"axios": "^0.17.0",
"cross-env": "^4.0.0",
"lodash": "^4.17.15",
Expand All @@ -48,7 +48,6 @@
"devDependencies": {
"@babel/plugin-syntax-jsx": "^7.2.0",
"@babel/runtime": "^7.1.5",
"@bestminr/fastblur": "^0.1.1",
"@types/babel-core": "^6.25.5",
"@types/bluebird": "3.5.18",
"@types/express": "^4.16.0",
Expand Down
15 changes: 0 additions & 15 deletions doc/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,10 @@ import Component from 'vue-class-component'
import { State } from 'vuex-class'
import { Watch, Prop } from 'vue-property-decorator'
import axios from 'axios'
import { isServer, injectGlobal } from 'src/envs'
function get(url: string) {
if (isServer) url = `${injectGlobal.__INJECT_CONTEXT__.SERVER_HOST}${url}`
console.log('axios 发起请求:', url)
axios.get(url).then(({ data }) => {
console.log('axios 获取当前版本号:', data.version.join('.'))
})
}
@Component({
components: {},
})
export default class App extends Vue {
created() {
get('/private/version')
}
mounted() {
console.log('init APP')
}
Expand Down
21 changes: 0 additions & 21 deletions doc/src/views/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,6 @@ import { Trouter } from '@types'
import { commit, getState } from 'src/store'
import { isServer } from 'src/envs'
import fastblur from '@bestminr/fastblur'
let fastblurWasmModulePromise: Promise<typeof import('@bestminr/fastblur')>
function getFastBlurModule(): Promise<typeof import('@bestminr/fastblur')> {
return import('@bestminr/fastblur').then((m) => {
if (fastblurWasmModulePromise) {
return fastblurWasmModulePromise
}
const wasmPath = require('@bestminr/fastblur/fastblur_bg.wasm') // 使用 file-loader 处理的时候是酱紫的
console.log('got module', m, wasmPath)
// wasm-bindgen 生成的 js 和 d.ts 不太对... 只好这样强行调 init 函数了
const initPromise = (m as any).default(wasmPath)
fastblurWasmModulePromise = initPromise.then(() => {
return m
})
return fastblurWasmModulePromise
}).catch((err) => {
console.log('err', err)
}) as any
}
@Component({
components: {},
Expand Down Expand Up @@ -63,7 +43,6 @@ export default class APP extends Vue {
mounted() {
console.log('init Views')
getFastBlurModule()
}
addTestHotLoadingVuex() {
Expand Down
11 changes: 4 additions & 7 deletions doc/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,10 @@
lodash "^4.17.11"
to-fast-properties "^2.0.0"

"@bestminr/build@1.6.18":
version "1.6.18"
resolved "https://registry.yarnpkg.com/@bestminr/build/-/build-1.6.18.tgz#a1a84c7174c282ed630b4a2390fb3bb61f87b752"
"@bestminr/build@^1.6.22":
version "1.6.22"
resolved "https://registry.yarnpkg.com/@bestminr/build/-/build-1.6.22.tgz#e7825ee47afef4002b42bb580603401dd5c6ce76"
integrity sha512-vNkAwSp0Q3b2hAJ8swFr1RpohrevPS0WGUTD/yECpkhuEWTwXyBH2uVCpqJXi3m5o0NhEaO8feIJ7zG7escvdw==
dependencies:
"@babel/core" "^7.1.5"
"@babel/plugin-proposal-class-properties" "^7.1.0"
Expand Down Expand Up @@ -696,10 +697,6 @@
webpack-node-externals "^1.7.2"
webpackbar "^3.1.3"

"@bestminr/fastblur@^0.1.1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@bestminr/fastblur/-/fastblur-0.1.1.tgz#ed89586624ed668cdd15a6f9e25446019a91db6a"

"@cnakazawa/watch@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef"
Expand Down

0 comments on commit 98ebe36

Please sign in to comment.