You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ember-cli-yuidoc

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-yuidoc - npm Package Compare versions

Comparing version

to
0.9.0

30

lib/broccoli-yuidoc.js

@@ -6,3 +6,32 @@ 'use strict';

var CachingWriter = require('broccoli-caching-writer');
var Y = require('yuidocjs');
var originalHandleComment = Y.DocParser.prototype.handlecomment;
var AT_PLACEHOLDER = '---AT-PLACEHOLDER---';
var AT_PLACEHOLDER_REGEX = new RegExp(AT_PLACEHOLDER, 'g');
Y.DocParser.prototype.handlecomment = function(comment, file, line) {
var lines = comment.split(/\r\n|\n/);
var inMarkdownBlock = false;
var newLines = lines.map((line) => {
if (line.match(/^(\s*\*)?\s*```/)) {
inMarkdownBlock = !inMarkdownBlock;
}
return inMarkdownBlock ? line.replace(/@/g, AT_PLACEHOLDER) : line;
});
var ret = originalHandleComment.call(this, newLines.join('\n'), file, line);
var description = ret.find(t => t.tag === 'description');
if (description) {
description.value = description.value.replace(AT_PLACEHOLDER_REGEX, '@');
}
return ret;
}
BroccoliYuidoc.prototype = Object.create(CachingWriter.prototype);

@@ -19,3 +48,2 @@ BroccoliYuidoc.prototype.constructor = BroccoliYuidoc;

BroccoliYuidoc.prototype.build = function() {
var Y = require('yuidocjs');
var options = this.options;

@@ -22,0 +50,0 @@ options.outdir = path.resolve(this.outputPath, options.outdir);

2

package.json
{
"name": "ember-cli-yuidoc",
"version": "0.8.8",
"version": "0.9.0",
"description": "Generate documentation of your app/addon from your yuidoc comments",

@@ -5,0 +5,0 @@ "directories": {

@@ -12,3 +12,3 @@ # Ember-cli-yuidoc

Then, you need to add a `yuidoc.json` manifest on the root of your project. Run `ember g ember-cli-yuidoc` to generate
once with some sensitive defaults.
once with some sensible defaults.

@@ -15,0 +15,0 @@ ## Usage