{"name":"ast-plugin","version":"0.0.7","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":"9081825148dffe0de264f0d01e119830ec2ebce7","_id":"ast-plugin@0.0.7","_npmVersion":"6.4.1","_nodeVersion":"8.7.0","_npmUser":{"name":"atool","email":"vip@hust.edu.cn"},"dist":{"integrity":"sha512-FI3HYCdoH6wAB/fDBahKR/CzXU73AW1ips/f9L2yUOyVTIOrtmzmzSNeAH4XMhBUKO/kadgGTcjARs/L7W1fdQ==","shasum":"a88300d2100f4321e5c2147f84076336746cbd89","tarball":"http://registry-npm.ywwl.com/ast-plugin/download/ast-plugin-0.0.7.tgz","fileCount":7,"unpackedSize":7716,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcKNGCCRA9TVsSAnZWagAAoKsP/0aaoOZNcnWIxI4X9Gvz\nxdFHAtLjp3TWFzTbNg+/BQff98GTi1ftJae+i6NrdWKGw0YxOOYZ5PmQBuW5\nuZsv445kJPo2bEUXyJW3TDbgZobM3YwqAj7pYg04DvkRrB+RU9J1jS2ZRz0l\ncYvSSutOOKVACj0EdgHDI8C/KGMOJ09++AoAdubsaopvIGapDYqUIB1hexsz\n0ym72IHA00t9gb98usoi5j/wpc76+alu9xmn1BLUK1pCpPzuQ3MG2UIC84W1\nuHY2a+N55/Llp8K/kf53Z2KYTDoFT34bojz/66wgmoxsGAuNRiDySjMc12Sr\nGmeQLTGeLoJYG7c32f3SgE4Qn7V8/l1M8JIx4RIXaNdh11b1/q1/WAB7mD5/\nKWznHVSffdHIhLkn0rkH7YlsR7/KNjwwZOxrdBepkEQmJ5fwc5Wl5hcuU0+a\nfT1lzJ+rcj3Na2mJDnf/NbMsz6WQa5BfgdHr7qyXl0mi4o873X+IiAzZS9OH\nECc4Fz2n2/Nar5BgfW0oyJv8/EgoXOvjoSeVwDJBDlmibELUuLm7yY7oCgnI\nT4pfNQnwm92S3cz3jVyx1c7flOWvPpkv/+MxzYhxCkyey6VAoifr0aizvJwu\nOice+otKwE3w/k1MhJlJjmQBAnDgiGS/iJjbYaoSlO8akMeV7+CsMc47kWDc\n7aM/\r\n=9crK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+CbEIeTUmvmuwQmKcJWSrpf4B7NxvtXdkB8ckKnYDRAiAQkoU7Y/C3yvLxCVTwVaif1IS02iaVznnWpdJ8FNy/rA=="}],"size":2853,"noattachment":false,"key":"/ast-plugin/-/ast-plugin-0.0.7.tgz"},"maintainers":[{"name":"atool","email":"vip@hust.edu.cn"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-plugin_0.0.7_1546178945743_0.6061720298500688"},"_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":1546178945926,"_cnpm_publish_time":1546178945926,"dist-tags":{"latest":"0.0.7"}}