{"name":"ast-plugin","version":"0.0.5","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":"32b99212786eaa423641224c82bcc0fcda60b4f6","_id":"ast-plugin@0.0.5","_npmVersion":"6.4.1","_nodeVersion":"8.7.0","_npmUser":{"name":"atool","email":"vip@hust.edu.cn"},"dist":{"integrity":"sha512-jYteE0wjPxMPxoBSKA4f50oPM5BYw/mW6dad5bsxgQr0S8BI8hfuQ4UEdbfy6QzUfncLmkbvuzlNf2wP6ntl9g==","shasum":"3ae5a04458f329138d6ef1e9e896646e1a99242c","tarball":"http://registry-npm.ywwl.com/ast-plugin/download/ast-plugin-0.0.5.tgz","fileCount":7,"unpackedSize":7518,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcFv/oCRA9TVsSAnZWagAAvOgQAIW1HEl5Z08/hETjkPwj\nQPHylUeZvHcU+BImZd84QmMcd8S09QMfp0Lq/u/7tYn2ooEsg9YQYJ+zZ6Ve\nz0rfa6+pDKc1hKe05TIlGMhnDi895RmwRUVB3WNSNAxX5uy8th5eT67cfhjm\ngBWwVt/CGbvDGFPb4WsxMuW5tEqJj8lxVvl4mSvNICMwJ0JSaAos+dKoMaAO\nrx4kETd4mvNf/f8QkVV1aPTHKpIAbjt7meFHPs9M7MkElWlunsR0BfLdZwaS\nGEbq5GFzK2oVTK8Ixm/lFrqTgIe1pa53mfXzeCwPfQRVZs6/EAN6T9bbPyFd\n8Ytbrv131q2yUpRVi5Nj2QDFP9r3M7M8ptK3YWK2RxqyiWwZEHJfQyeVgi64\nr/+cyZYLntd800l4o79RPEKJkUMBbmvehn3B0ARzJLOfoODR16J8+eNKSf6Z\n2dU/cz/k+ivPXnUUhTT2opjWb6dsD2kD5/LVZ0xPmA8lrloPzuHWzdfnO+Us\nsUOwG0lZfuh42Z85IiccbYMBY7jwVWhrjVV4hFWznEyQxn75p5AE6+J040Ym\n1szPlLigRJWzHk3br+um5Bihu4AeuU73cZZiIBEUcYLbHZjJDWcGAsjtvKcJ\nVQ0Tj2vfAihrJE1hJJAzBqi1mv+QVbJZfggZor7VGvUE6SDIyT/SgTmG/wVb\ngKIh\r\n=uxaj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClrM+9lrTN8R41TZ/4bRYaHTY6orjv+y4+2tM61NAISAIhAPDDcS7+YqEbYAyAvMBJg+YQXKQ7dLFQv+E2rKBrKlwp"}],"size":2819,"noattachment":false,"key":"/ast-plugin/-/ast-plugin-0.0.5.tgz"},"maintainers":[{"name":"atool","email":"vip@hust.edu.cn"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ast-plugin_0.0.5_1545011175468_0.26671946518691536"},"_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":1545011175617,"_cnpm_publish_time":1545011175617,"dist-tags":{"latest":"0.0.7"}}