Coder Social home page Coder Social logo

Comments (3)

rogierschouten avatar rogierschouten commented on May 28, 2024

Can you give me a working example that demonstrates the problem? I've tried to reproduce this but underlying typescript errors are nicely caught in the on("error") handler. Are you using the latest versions of TypeDoc, TypeScript and gulp-typedoc?

./bla.ts:

export class Bla {
   %&#*(%_#*())
}

./gulpfile.js

var gulp = require("gulp");
var typedoc = require("gulp-typedoc");

gulp.task("default", [], function () {
    return gulp.src("./bla.ts")
        .pipe(typedoc({
            module: "commonjs",
            target: "es6",
            out: "./doc"
        }))
        .on("error", function (e) {
            console.log("trapped error", e)
        });
});

./package.json

{
  "name": "temp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "gulp": "^3.9.1",
    "gulp-typedoc": "^2.0.1",
    "typedoc": "^0.5.3",
    "typescript": "^2.1.4"
  }
}

output:

$ gulp
[21:14:58] Using gulpfile ~\Documents\GitHub\temp\gulpfile.js
[21:14:58] Starting 'default'...
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(4)
 Unexpected token. A constructor, method, accessor, or property was expected.
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(4)
 Expression expected.
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(4)
 Invalid character.
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(4)
 Expression expected.
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(4)
 Expression expected.
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(4)
 Invalid character.
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(4)
 Expression expected.
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(4)
 Expression expected.
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(4)
 ';' expected.
[21:15:00] C:/Users/Rodzj/Documents/GitHub/temp/bla.ts(5)
 Declaration or statement expected.
trapped error { [Error: Failed to generate load TypeDoc project.]
  message: 'Failed to generate load TypeDoc project.',
  showStack: false,
  showProperties: true,
  plugin: 'gulp-typedoc',
  __safety: { toString: [Function: bound ] } }
[21:15:00] 'default' errored after 1.74 s
[21:15:00] Error in plugin 'gulp-typedoc'
Message:
    Failed to generate load TypeDoc project.

from gulp-typedoc.

rogierschouten avatar rogierschouten commented on May 28, 2024

Just to be sure, I added an extra try-catch block in v2.0.2 Please let me know if it fixes your issue

from gulp-typedoc.

thegecko avatar thegecko commented on May 28, 2024

Hmm, typically I've tried today and can't re-create either! I am using a slightly older version;

    "typedoc": "0.5.1",
    "typescript": "2.1.1"

But your test example above runs fine with this set up. Thanks for looking into this, I'll re-open the issue if I can reliably re-create it again.

from gulp-typedoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.