You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
438 B
20 lines
438 B
process.UNI_APIS = new Set()
|
|
module.exports = function ({
|
|
types: t
|
|
}) {
|
|
return {
|
|
visitor: {
|
|
MemberExpression (path, state) {
|
|
if (
|
|
t.isIdentifier(path.node.object) &&
|
|
(
|
|
path.node.object.name === 'uni' ||
|
|
path.node.object.name === 'wx'
|
|
)
|
|
) {
|
|
process.UNI_APIS.add(path.node.property.name || path.node.property.value)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|