在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:cloudflare/JSON.is开源软件地址:https://github.com/cloudflare/JSON.is开源编程语言:JavaScript 69.8%开源软件介绍:JSON.isOpen-source documentation for common JSON formats. Currently included:
ContributingWe welcome contributors of both improvements and additional JSON formats. FormatFormat definition files are located in coffee/formats. The definitions are CoffeeScript source files. Each file exports an object mapping regular expressions to HTML descriptions. The regular expressions are tested against the path to the object the user currently has his or her cursor over. The first complete match determines what documentation block is shown. For example, to add a doc for 'engines': '''
<h4>Engines</h4>
''' Any character with special meaning in regular expressions (like 'engines\.node': '''
<h4>Node Version</h4>
''' There are two 'shortcuts' which are available,
For example, to write a doc for any property within 'engines\.PROPERTY': '''
<h4>Engines</h4>
''' You can use regular expression syntax to create a section which will match both the parent, and it's children: 'engines(\.PROPERTY)?': '''
<h4>Engines</h4>
''' When dealing with an array, you can do a similar thing with 'keywords\.INDEX': '''
<h4>Keyword</h4>
''' You can use the pipe regular expression syntax to match multiple options: '(dependencies|devDependencies)': '''
<h4>Dependencies</h4>
''' As each file is CoffeeScript, you can add arbitrary code: 'description': '''
<h4>Description</h4>
''' + new Date Each doc body can also be a function, which will be passed the item which was matched: '(dependencies|devDependencies)': (item) ->
"<h4>#{ item.path }</h4>" HTML Conventions
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论