Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

builddocs

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

builddocs - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "builddocs",
"version": "0.2.0",
"version": "0.2.1",
"description": "Build documentation files from getdocs-commented source code",

@@ -5,0 +5,0 @@ "main": "src/builddocs.js",

@@ -50,2 +50,5 @@ # builddocs

* **`markdownOptions`**`: ?Object` A set of options to pass through
to [markdown-it](https://github.com/markdown-it/markdown-it).
The second parameter, `data`, can be used if the data for the module

@@ -52,0 +55,0 @@ has already been read. By default, `build` will read it.

var fs = require("fs")
var Mold = require("mold-template")
var markdown = (require("markdown-it")({html: true})).use(require("markdown-it-deflist"))
var read = exports.read = require("./read").read

@@ -13,2 +11,6 @@ var builtins = require("./builtins")

var mdOptions = {html: true}
if (config.markdownOptions) for (var prop in config.markdownOptions) mdOptions[prop] = config.markdownOptions[prop]
var markdown = require("markdown-it")(mdOptions).use(require("markdown-it-deflist"))
var placed = Object.create(null)

@@ -24,3 +26,3 @@ var doc = markdown.render(fs.readFileSync(config.main, "utf8").replace(/(^|\n)@(\w+)(?=$|\n)/g, function(_, before, name, after) {

var mold = loadTemplates(config, data)
var mold = loadTemplates(markdown, config, data)

@@ -39,3 +41,3 @@ return doc.replace(/<div data-item="([^"]+)"><\/div>/g, function(_, name) {

function loadTemplates(config, data) {
function loadTemplates(markdown, config, data) {
var mold = new Mold(moldEnv(config, data))

@@ -42,0 +44,0 @@ mold.defs.markdown = function(text) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc