{"name":"ast-plugin","version":"0.0.6","description":"The simplest abstract syntax tree walker.","main":"lib/index.js","scripts":{"test":"jest --no-cache","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","babel-plugin-version":"^0.2.3","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":"bf786351851b55e97d30a811afaf1afecc0e1d30","_id":"ast-plugin@0.0.6","_npmVersion":"6.4.1","_nodeVersion":"8.7.0","_npmUser":{"name":"atool","email":"vip@hust.edu.cn"},"dist":{"integrity":"sha512-6mePOiYl+TIMMU1Tje4dC/QLUs20GiGGUlzPfI2vUlzWkQlrVo4d1hm0sc/QJWlxSxmqX+GLDZ0pHczM9Kgfrw==","shasum":"885b5b8492d6c37683dc6642860fa2d5a95de7f8","tarball":"http://registry-npm.ywwl.com/ast-plugin/download/ast-plugin-0.0.6.tgz","fileCount":7,"unpackedSize":7568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcKJMtCRA9TVsSAnZWagAArAsQAI5E861GE7ZptZ+ccWG2\nf19X0dItZqZfLigjLfn/hjXzGiuO+ro7WGoeo8fnPeVPvnPlPkX/Z0b1zlY5\nM1HBSNp8OUakTtRqSiQWkpJ+sukK3BZzKFdh3C2n+3qYaPwkNnkA4Z/+5dfb\n/Tdx0/zJvEg4hxQgM0RCq0NWXamhziHehwr/tP3En5SJj0kCy6vtQgtcd/Ov\nfhm5L9LUrJ5+Ymc7M8KUZ5TcwQTjfV9vwKzIkmmGs5Ic20Q9TsYnWPFR5CZ7\net7pYrHUUjixNx2tUMaNt01vVXMwdjlT8BSv4LrkIznmakqazmesEi3/41Bb\nZN9Bs5bShEPW7j0Lcmy86YYTwIQt0dqUn9DG9nBWeObO005YN9HdI85JiTuz\nY45qlY+rtzpGmdGhvM43hC4VavGxUrVt02sWbQSjYUKtviXFFVSLPXwzmEjo\nd8An7MSVaESfQZyQ6pUxYFF1kU3zCVEDdWvi70I6u++6E6eeFJEK9jNZR0sP\nTfZh54BTKX3wNi7j87Y25o5+HkGY94iHpFxeBDOIvZT8wHRN2PRHIhzV3iMm\n5+Z4Zdis4KkT1WMS4HkPuO9FDuUELrMaP3/6wr66dK//cAk38RVIH9CYcoyT\n6Q4CuCNAnrfGWMTpbXDzjxnaKKfbBeWUpFQvl2JiWWlTlvGiMq3H62GFk87x\nQ8XZ\r\n=hpdo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnW4LXY5GCk71WAWASkBBGrf0W0x8KKskaqc0CmBidiAIgD3nI2WH870l52j6e6qx1OXb9M0gE/wx0BsY3SGO8Qgk="}],"size":2812,"noattachment":false,"key":"/ast-plugin/-/ast-plugin-0.0.6.tgz"},"maintainers":[{"name":"atool","email":"vip@hust.edu.cn"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-plugin_0.0.6_1546162988211_0.8573926534696281"},"_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":1546162988379,"_cnpm_publish_time":1546162988379,"dist-tags":{"latest":"0.0.7"}}