提交 365e7e7f 编写于 作者: Q qiang

style: lint

上级 ae2acc3a
...@@ -570,7 +570,7 @@ export default { ...@@ -570,7 +570,7 @@ export default {
complete && complete() complete && complete()
}) })
}, },
_getCollection() { _getCollection () {
const index = this.collection.indexOf(',') const index = this.collection.indexOf(',')
const collection = index > 0 ? this.collection.substring(0, index) : this.collection const collection = index > 0 ? this.collection.substring(0, index) : this.collection
return collection return collection
......
...@@ -25,7 +25,7 @@ const mpBaiduDynamicLibs = [ ...@@ -25,7 +25,7 @@ const mpBaiduDynamicLibs = [
'dynamicLib://myDynamicLib/vrvideo' 'dynamicLib://myDynamicLib/vrvideo'
] ]
function analyzeUsingComponents() { function analyzeUsingComponents () {
if (!process.env.UNI_OPT_SUBPACKAGES) { if (!process.env.UNI_OPT_SUBPACKAGES) {
return return
} }
...@@ -95,7 +95,7 @@ function analyzeUsingComponents() { ...@@ -95,7 +95,7 @@ function analyzeUsingComponents() {
// }, {}) // }, {})
} }
function normalizeUsingComponents(file, usingComponents) { function normalizeUsingComponents (file, usingComponents) {
const names = Object.keys(usingComponents) const names = Object.keys(usingComponents)
if (!names.length) { if (!names.length) {
return usingComponents return usingComponents
...@@ -107,7 +107,7 @@ function normalizeUsingComponents(file, usingComponents) { ...@@ -107,7 +107,7 @@ function normalizeUsingComponents(file, usingComponents) {
return usingComponents return usingComponents
} }
module.exports = function generateJson(compilation) { module.exports = function generateJson (compilation) {
analyzeUsingComponents() analyzeUsingComponents()
const jsonFileMap = getChangedJsonFileMap() const jsonFileMap = getChangedJsonFileMap()
...@@ -180,10 +180,10 @@ module.exports = function generateJson(compilation) { ...@@ -180,10 +180,10 @@ module.exports = function generateJson(compilation) {
scopedSlotComponents.forEach(scopedSlotComponent => { scopedSlotComponents.forEach(scopedSlotComponent => {
compilation.assets[scopedSlotComponent] = { compilation.assets[scopedSlotComponent] = {
size() { size () {
return Buffer.byteLength(scopedSlotComponentJsonSource, 'utf8') return Buffer.byteLength(scopedSlotComponentJsonSource, 'utf8')
}, },
source() { source () {
return scopedSlotComponentJsonSource return scopedSlotComponentJsonSource
} }
} }
...@@ -215,20 +215,20 @@ module.exports = function generateJson(compilation) { ...@@ -215,20 +215,20 @@ module.exports = function generateJson(compilation) {
!compilation.assets[jsFile] !compilation.assets[jsFile]
) { ) {
const jsFileAsset = { const jsFileAsset = {
size() { size () {
return Buffer.byteLength(EMPTY_COMPONENT, 'utf8') return Buffer.byteLength(EMPTY_COMPONENT, 'utf8')
}, },
source() { source () {
return EMPTY_COMPONENT return EMPTY_COMPONENT
} }
} }
compilation.assets[jsFile] = jsFileAsset compilation.assets[jsFile] = jsFileAsset
} }
const jsonAsset = { const jsonAsset = {
size() { size () {
return Buffer.byteLength(source, 'utf8') return Buffer.byteLength(source, 'utf8')
}, },
source() { source () {
return source return source
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册