Skip to content

Doesn't work for me :( #4

@svallory

Description

@svallory

Looks like it's trying to parse TypeScript as if it was Javascript. (since as I go about changing the file replacing the typescript syntax by js syntax, it complains about the next typescript specific token).

tsdoc.json

{
    "tags":
    {
        "allowUnknownTags" : true
    },
    "plugins":[
         "plugins/markdown"
        ,"/usr/local/lib/node_modules/tsdoc/template/plugins/TSDoc.js"
    ],
    "opts":
    {
        "template"  :"/usr/local/lib/node_modules/tsdoc/template",
        "recurse"   :"false"
    },
    "templates" : {
        "cleverLinks"     : false,
        "monospaceLinks"  : false
    },
    "source":
    {
        "includePattern": "docs(\\.d)?\\.ts$"
    },
    "markdown"  : {
        "parser"   : "gfm",
        "hardwrap" : true
    },
    "tsdoc":{
        "source"          : "/projects/theblacksmith/tsm/lib/tsm/",
        "destination"   : "/projects/theblacksmith/tsm/docs/",
        "tutorials"     : "",
        "systemName"    : "TSM",
        "footer"          : "",
        "copyright"     : "TSM Copyright © 2013 TheBlacksmith - Licensed under MIT License",
        "outputSourceFiles" : true,
        "commentsOnly": true
    }
}

docs.ts

/// <reference path="../typings/colors.d.ts" />

class Docs {
  // @todo improve name to url conversion
  static link(page: string);
  static link(name: string, page?: string) {
    if(arguments.length == 1)
      page = name;
    return name + " >> ".green + "https://github.com/theblacksmith/tsm/wiki/" + page.replace(' ', '-');
  }
}

output

TSDOC v0.0.4
TSDoc Generating doc...
TSDoc Done.
exec error: Error: Command failed: 
/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3872
            throw e;
                  ^
Error: Line 3: Unexpected reserved word
    at throwError (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1156:21)
    at throwUnexpected (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1204:17)
    at parsePrimaryExpression (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1567:16)
    at /usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3609:38
    at trackLeftHandSideExpressionAllowCall (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3504:61)
    at parsePostfixExpression (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1703:20)
    at /usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3609:38
    at parseUnaryExpression (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1784:16)
    at /usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:3609:38
    at parseMultiplicativeExpression (/usr/local/lib/node_modules/jsdoc/node_modules/esprima/esprima.js:1790:20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions