Skip to content

Commit

Permalink
move apis.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Jul 29, 2019
1 parent c3d71c9 commit 68e3ff9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
12 changes: 6 additions & 6 deletions build/manifest.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require('fs')
const path = require('path')

const apis = require('../src/core/helpers/apis')
const apis = require('../lib/apis')

const AUTO_LOADS = [
'upx2px',
Expand Down Expand Up @@ -49,11 +49,8 @@ const DEPS = {
['/core/view/bridge/subscribe/api/request-component-info.js', 'requestComponentInfo']
],
'createIntersectionObserver': [
[
'/core/view/bridge/subscribe/api/request-component-observer.js',
'requestComponentObserver',
'destroyComponentObserver'
]
['/core/view/bridge/subscribe/api/request-component-observer.js', 'requestComponentObserver'],
['/core/view/bridge/subscribe/api/request-component-observer.js', 'destroyComponentObserver']
]
}

Expand Down Expand Up @@ -113,6 +110,9 @@ function parseApiManifestDeps (manifest, protocol) {

module.exports = {
generateApiManifest (manifest, protocol) {
if (!Object.keys(manifest).length) {
throw new Error('api manifest.json 生成失败')
}
parseApiManifestDeps(manifest, protocol)

const manifestJson = Object.create(null)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/babel-plugin-uni-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const protocolPath = resolve('../../src/core/helpers/protocol')
const coreApiPath = resolve('../../src/core/service/api')
const platformApiPath = resolve('../../src/platforms/' + process.env.UNI_PLATFORM + '/service/api')

const apis = require('../../src/core/helpers/apis')
const apis = require('../apis')

process.UNI_SERVICE_API_MANIFEST = Object.create(null)
process.UNI_SERVICE_API_PROTOCOL = Object.create(null)
Expand Down
2 changes: 1 addition & 1 deletion packages/uni-h5/dist/index.umd.min.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion packages/uni-h5/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,10 @@
[
[
"/core/view/bridge/subscribe/api/request-component-observer.js",
"requestComponentObserver",
"requestComponentObserver"
],
[
"/core/view/bridge/subscribe/api/request-component-observer.js",
"destroyComponentObserver"
]
]
Expand Down
2 changes: 1 addition & 1 deletion src/core/service/uni.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import apis from 'uni-helpers/apis'
import apis from '../../../lib/apis'
import {
wrapper,
wrapperUnimplemented
Expand Down

0 comments on commit 68e3ff9

Please sign in to comment.