Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular2 Typescript Project w/ Dgeni #150

Open
colinkahn opened this issue May 31, 2016 · 12 comments
Open

Angular2 Typescript Project w/ Dgeni #150

colinkahn opened this issue May 31, 2016 · 12 comments

Comments

@colinkahn
Copy link

Hi,

Is there a simple example of Dgeni (similar to https://github.com/petebacondarwin/dgeni-example) that shows how you'd use it with an Angular 2 application using TypeScript?

Currently I have this:

var Package = require('dgeni').Package;
var jsdocPackage = require('dgeni-packages/jsdoc');
var nunjucksPackage = require('dgeni-packages/nunjucks');
var typescriptPackage = require('dgeni-packages/typescript');
var path = require('canonical-path');

// Define the dgeni package for generating the docs
module.exports = new Package('hex-angular-docs', [
  jsdocPackage,
  nunjucksPackage,
  typescriptPackage
])

// Configure the log service
.config(function(log) {
  log.level = 'silly';
})

.config(function (readTypeScriptModules, readFilesProcessor, templateFinder) {
  readTypeScriptModules.basePath = path.resolve(__dirname, '../../src/client');
  readTypeScriptModules.sourceFiles = [
    'button/index.ts'
  ];

  // Specify the base path used when resolving relative paths to source and output files
  readFilesProcessor.basePath = path.resolve(__dirname, '../../src/client');

  // Specify collections of source files that should contain the documentation to extract
  readFilesProcessor.sourceFiles = [
    {
      include: 'app/**/*.md',
      basePath: 'app'
    }
  ];

  templateFinder.templatePatterns.unshift('common.template.html');
})

// Configure file writing
.config(function(writeFilesProcessor) {
  writeFilesProcessor.outputFolder  = 'docs';
})

Which I've pieced together from various examples. While I've gotten over the hurdle of it throwing errors, it isn't actually generating any documentation.

Any help is greatly appreciated.

@vamsivarikuti
Copy link

vamsivarikuti commented Jun 21, 2016

@clavecoder
Copy link
Contributor

@colinkahn, did you get anywhere with this? Typedoc doesn't support TypeScript 2 (TypeStrong/typedoc#234), so were kind of stuck.

@CarreraPHP
Copy link

I would also like to know if there is some way we can use dgeni with angular2. However, i would be extremely happy it can be incorporated with angular-cli.

@petebacondarwin
Copy link
Contributor

I intend to work on a turn-key solution for A2 projects later this year (or
early next year) if you can wait that long.

On 6 October 2016 at 08:16, Yogesh Surendran [email protected]
wrote:

I would also like to know if there is some way we can use dgeni with
angular2. However, i would be extremely happy it can be incorporated with
angular-cli.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#150 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAA9J-Lvc4SOL8y5iD5SuobSRUFSAVo6ks5qxKBfgaJpZM4IrCk_
.

@clavecoder
Copy link
Contributor

clavecoder commented Oct 6, 2016

If you could generalize for vanilla TS projects also, we would be very grateful.

@CarreraPHP
Copy link

@petebacondarwin, Waiting should not be a problem. My extjs to angular2 rewrite project is in final stage of Proposal/POC state and would kickstarted by end of this month.

If i have an alternate for jsduck documentation that works well with Angular2. I am happy with any solution that u provide.

Thanks for your consideration. Appreciate your efforts.

@DSoa
Copy link

DSoa commented Jan 10, 2017

@petebacondarwin, any update on your turn-key solution for Angular2? Dgeni is quite intimidating and it would be great to have a Angular2-aware implementation to work with.

Thanks.

@petebacondarwin
Copy link
Contributor

@DSoa - recently @jelbourn did some work to generate docs for Angular Material 2 using dgeni (https://github.com/angular/material2/tree/master/tools/dgeni). He has provided some feedback that we need to work back into dgeni-packages to help here. Keep watching...

@collink
Copy link

collink commented May 22, 2019

@petebacondarwin / @jelbourn Any update on this? I'm not happy with the results that Compodoc or TypeDoc provide, and I'd like to do something similar to the material docs.

@petebacondarwin
Copy link
Contributor

We still have not productionized a turn-key solution for documenting Angular apps/libraries via dgeni.
But the work in the Angular components (aka Material) project is a good starting place: https://github.com/angular/components/tree/master/tools/dgeni as linked above.

@collink
Copy link

collink commented May 22, 2019

@petebacondarwin That was the approach I was taking, but I don't really want to go down the Bazel route and there are a lot of pieces of the Dgeni package which are provided by Bazel. I'll take another crack at it I suppose and see if I can get more traction this time haha. Thanks.

@petebacondarwin
Copy link
Contributor

Feel free to email me directly if you want to chat about any aspect of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants