{"name":"ast-plugin","version":"0.0.1","description":"Ast plugin core.","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":"9d4b48389b26fd39f1eaece7b4da25b6dd93bda4","_id":"ast-plugin@0.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.7.0","_npmUser":{"name":"atool","email":"vip@hust.edu.cn"},"dist":{"integrity":"sha512-Ubibyym1caDKEgWMeErYlBv5cJ6/iPhBVUsXo9E92HphAYRgaoiZ+F2RmGqQUipDYSW2vgWBGJf86mhws+FcRw==","shasum":"7872b57c029d024dc7250b7324042cd4b5ddda9e","tarball":"http://registry-npm.ywwl.com/ast-plugin/download/ast-plugin-0.0.1.tgz","fileCount":6,"unpackedSize":5897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb6WsbCRA9TVsSAnZWagAAZ2cQAJNjPP2jZMzvm0w5rpQP\nDgbvBu8m8CisULhRsz7Moh0MpH61236YWiJwXtjrTYavIppXigk8L3ItA94Q\nUFkGDePidjLO1btjS/5fpnGw+o9T2hnOWvPEdliWAM1iATx3iyPOD1dz1W+U\n+ubogoSLkGG2Qe97cgu8QVkol+M/ouGl3n4FpHvy179Fa0fLQ83hi9131yNg\n8AQawEKW2JpMmGvHxa6SgY7XHXtQIIL7FcR1UgR3evM0m3lPKY/zk1+umbeA\nmklkStDJ6kRrajerugx9dJorJfzPZOkgOZqgqS6LUn5eAYNLjjZd6ml4OOPM\n3oUCcclEGL2/8eyzRY3BDNPVBbP/j9GzCKdYSnORLDlYRrV6YVFIfjOcZm3d\nvr/L4TGKvWVoikiHQr8eUVvmu4x0EWRlA4wv0T8bbVUV3DcLLyWrteW09xZE\n80Hm6+rMGZRstg4ielmZx9XjLKpNbP9XGph/08DIEdNGSNWzne8Hmnprg71a\nfqKOgX97T4Fzu/CQQF7TyooChEsMe0w7KxuU+iXNiA9mfkE93VvFx6amPs2W\nF4Up9PMoSM+FuopH18ulfkp6CC2RMa9ry33AjEGQ5oWwvR/F1RoahqV4Cycd\nMkGGwZhj+8viKtxohzh1leUYQnb2ENGQWM7ekEv0yrND5yEqyLdHgkfxSs7N\nQmyc\r\n=dLtR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCg/4FgR8QgtLk734OTv08yv6r64Jik4WeOEjXKJ0vUjwIge6APMzgFY7HPGAMHcXALi5jLpcXRl3JosiGs1UiHcLU="}],"size":2141,"noattachment":false,"key":"/ast-plugin/-/ast-plugin-0.0.1.tgz"},"maintainers":[{"name":"atool","email":"vip@hust.edu.cn"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-plugin_0.0.1_1542023963222_0.3985288573388719"},"_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":1542023963390,"_cnpm_publish_time":1542023963390,"dist-tags":{"latest":"0.0.7"}}