annotating

0.0.2 • Public • Published

大有用处的注释

以前用PHP开发web应用时,非常喜欢PHP的反射类,通过反射类能够解析到类、方法、属性的注释语句, 利用注释语句实现很多意想不到的功能,在这方法,php框架symfony在这方法可谓做到了极致。但是在 npmjs里面找到了一些类似的,但经过使用,要么过于简单,有么包含了不需要的功能, 所以在这里决定写一个符合公司业务逻辑的annotations解析工具。

Metadata

  • path
  • definition
  • construction
  • methods

Compiler

  • setDirective(name: string, directive: Function)
  • compile(path: string)

Parser

  • setSource(source: string|Buffer): ParserInterface
  • setMetadata(metadata: MetadataInterface): ParserInterface
  • parseFile(path: string): MetadataInterface
  • parse(): MetadataInterface

MetadataError

AnnotatingError

Package Sidebar

Install

npm i annotating

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • vuesify