{"name":"ast-plugin","version":"0.0.4","description":"The simplest abstract syntax tree walker.","main":"lib/index.js","scripts":{"test":"jest","coveralls":"cat ./coverage/lcov.info | coveralls","build":"rimraf ./lib && babel src -d lib"},"repository":{"type":"git","url":"git+https://github.com/hustcc/ast-plugin.git"},"keywords":["ast","plugin","ast-plugin"],"author":{"name":"hustcc"},"license":"MIT","bugs":{"url":"https://github.com/hustcc/ast-plugin/issues"},"homepage":"https://github.com/hustcc/ast-plugin#readme","devDependencies":{"@babel/cli":"^7.1.5","@babel/core":"^7.1.5","@babel/plugin-proposal-class-properties":"^7.1.0","@babel/plugin-transform-spread":"^7.0.0","@babel/preset-env":"^7.1.5","babel-core":"^7.0.0-bridge.0","babel-jest":"^23.6.0","coveralls":"^3.0.2","jest":"^23.6.0","remark-parse":"^6.0.2","rimraf":"^2.6.2","unified":"^7.0.1"},"jest":{"collectCoverage":true,"testEnvironment":"node","testRegex":"(/__tests__/.*\\.(test|spec))\\.jsx?$","collectCoverageFrom":["src/**/*.{js,jsx}"]},"gitHead":"1d259b6d055599c915e4955948120675e73a84eb","_id":"ast-plugin@0.0.4","_npmVersion":"6.4.1","_nodeVersion":"8.7.0","_npmUser":{"name":"atool","email":"vip@hust.edu.cn"},"dist":{"integrity":"sha512-YtS8VNdGSQA09QJNw8EM8RM+KOXfr1MXum7HQjLGuIrYOY6y3PUwXsYmosDE3VuoPBQNpb2Tz2bF/tEgtHvB9Q==","shasum":"3b2a42b064b5119b7d1e17847843f372c3d30fed","tarball":"http://registry-npm.ywwl.com/ast-plugin/download/ast-plugin-0.0.4.tgz","fileCount":7,"unpackedSize":6766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFRYICRA9TVsSAnZWagAAquoP/juyebvX3WidenaXWVF7\nb3hmOvoijQR8EOMriv83cxRXbBZTp+I6aQ6se1uXOapmFj5CLobQ1xOEV8cD\ng2v2SaZv2xb+1vRAwpZUaet1Mb43b1TXGsEq+oqvUFC7m5JYzszqWBkgYmAU\n8C3H2HlWRTh+iVS54Twhm+a+VdGsy5rbUIrTmhNj8nQBq8TCwBzxbcaXT0J7\n2PMb/j4X65JltugFu38AB4t+Rz9QFJrZNayl8mZUVuYkP3gUhGDTs9ROqVE2\ns81k5m/wnqr4PBfYmC5JLVbYLLxGbzeddUI53uFma80jm7ijfGHsQR6RLyIX\nQR/J58y49iGFhNGE0ARDPCWLY1zu+1H4madPKoUKIhBRDqSEK6cWDeTPB+uf\nzUNQBIQYWUVr55PKof+up0/AKgRRp8vO/Ct+Wmoxoano+bvSQ8fMCfZOazG1\nx8p7OvMU4y+wQw1UtDI3ZxgLvLDc+r1sTD2TL73YQo1x0PJnJ7DfRNtS18Mm\nJaPgqFQOYAcEEtmr1GXJZmoudcOdNFGbxVqHh0s3J0RoEqMF/czN4VvfUcog\nj9xeSdsa+Y46jq4J3ixO3YR5bls5D4EXw8nFieFI3qQET6HtMQm5j/MSD7U7\nIylaV4rA7Pm93HgZ7KIlXhIeUm3I6Ih5Nm5/8xM7Wcg95npysVZWsd1De7t8\nOLbW\r\n=fQdC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF13yOWy5qq8k6hwpw5ncfQ9fdCS1JxXgmCppH/tNphpAiEA1Mz0hvp6fRr9q7g+df7VVMEptVol8gC77gmLL2yu7Ss="}],"size":2559,"noattachment":false,"key":"/ast-plugin/-/ast-plugin-0.0.4.tgz"},"maintainers":[{"name":"atool","email":"vip@hust.edu.cn"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-plugin_0.0.4_1544885768308_0.12882392531264308"},"_hasShrinkwrap":false,"readme":"# ast-plugin\n\n> The simplest abstract syntax tree walker.\n\n\n## Install\n\n> npm i --save ast-plugin\n\n\n\n## Usage\n\n - Traverse Ast plugins\n\n```js\nimport { Ast, Plugin } from 'ast-plugin';\n\nnew Ast(ast).traverse([\n  new TestPlugin(cfg),\n  // ...\n]);\n```\n\n - Write an ast plugin\n\n```js\nimport { Ast, Plugin } from 'ast-plugin';\n\nclass TestPlugin extends Plugin {\n\n  pre = () => {};\n\n  visitor = () => {\n    return {\n      // process node with type = 'text'\n      text: ast => {\n        console.log(ast.node);\n        ast.segment();\n      },\n    };\n  };\n\n  post = () => {};\n}\n```\n\n\n\n## Used by\n\n - [lint-md](https://github.com/hustcc/lint-md): Cli tool to lint your markdown file for Chinese.\n\n\n\n\n## License\n\nMIT@[hustcc](https://github.com/hustcc).\n","publish_time":1544885768445,"_cnpm_publish_time":1544885768445,"dist-tags":{"latest":"0.0.7"}}