Skip to content

Latest commit

 

History

History
157 lines (157 loc) · 4.53 KB

node.md

File metadata and controls

157 lines (157 loc) · 4.53 KB

{ '0': //arguments第一个参数是path对象 NodePath { parent: { type: 'VariableDeclarator', id: [Object], init: [Object] }, hub: Hub { file: [Object], options: undefined }, contexts: [ [Object] ], data: {}, shouldSkip: false, shouldStop: false, removed: false, state: undefined, opts: { Program: [Object], _exploded: {}, _verified: {}, ImportDeclaration: [Object], CallExpression: [Object], MemberExpression: [Object], VariableDeclarator: [Object], LogicalExpression: [Object], ConditionalExpression: [Object], IfStatement: [Object], ExpressionStatement: [Object], ExportDefaultDeclaration: [Object], ObjectProperty: [Object], ClassProperty: [Object], DoExpression: [Object], BindExpression: [Object], ClassDeclaration: [Object], ClassExpression: [Object], ExportNamedDeclaration: [Object], ArrowFunctionExpression: [Object], ObjectExpression: [Object], FunctionDeclaration: [Object], FunctionExpression: [Object], ObjectMethod: [Object], ClassMethod: [Object], AssignmentExpression: [Object], BinaryExpression: [Object], CatchClause: [Object], ForInStatement: [Object], ForOfStatement: [Object], ForAwaitStatement: [Object], TaggedTemplateExpression: [Object], TemplateLiteral: [Object], NumericLiteral: [Object], StringLiteral: [Object], BlockStatement: [Object], SwitchCase: [Object], Super: [Object], RegExpLiteral: [Object], DoWhileStatement: [Object], ForStatement: [Object], SwitchStatement: [Object], WhileStatement: [Object], ArrayExpression: [Object], NewExpression: [Object], VariableDeclaration: [Object], UnaryExpression: [Object], ThisExpression: [Object], Identifier: [Object], JSXIdentifier: [Object] }, skipKeys: {}, parentPath: NodePath { parent: [Object], hub: [Object], contexts: [Object], data: {}, shouldSkip: false, shouldStop: false, removed: false, state: undefined, opts: [Object], skipKeys: {}, parentPath: [Object], context: [Object], container: [Object], listKey: 'declarations', inList: true, parentKey: 'declarations', key: 0, node: [Object], scope: [Object], type: 'VariableDeclarator', typeAnnotation: null }, context: TraversalContext { queue: [Object], parentPath: [Object], scope: [Object], state: undefined, opts: [Object], priorityQueue: [] }, container: { type: 'VariableDeclarator', id: [Object], init: [Object] }, listKey: undefined, inList: false, parentKey: 'init', key: 'init', node: { type: 'CallExpression', callee: [Object], arguments: [Object] }, scope: Scope { uid: 0, parent: null, hub: [Object], parentBlock: [Object], block: [Object], path: [Object], labels: [Object], references: [Object], bindings: [Object], globals: [Object], uids: [Object], data: {}, crawling: false }, type: 'CallExpression', typeAnnotation: null }, '1': //arguments第二个参数是PluginPass对象 PluginPass { _c: Map {}, dynamicData: {}, plugin: Plugin { _c: Map {}, dynamicData: {}, initialized: true, raw: {}, key: 'aa', manipulateOptions: undefined, post: undefined, pre: undefined, visitor: [Object] }, key: 'aa', file: File { _c: Map {}, dynamicData: {}, pipeline: Pipeline {}, log: [Object], opts: [Object], parserOpts: [Object], pluginVisitors: [Object], pluginPasses: [Object], metadata: [Object], dynamicImportTypes: {}, dynamicImportIds: {}, dynamicImports: [], declarations: [Object], usedHelpers: [Object], path: [Object], ast: [Object], code: 'import React from "react";\r\nclass Test {\r\n name = 'liangklfang'\r\n sayHello (){\r\n \t console.log('Hello');\r\n }\r\n}', shebang: '', hub: [Object], scope: [Object] }, opts: { libraryName: 'antd' } } }