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

Feature/compodoc Ready to generate Angular documentation #76

Merged
merged 6 commits into from
Apr 27, 2017

Conversation

RSginer
Copy link
Contributor

@RSginer RSginer commented Apr 25, 2017

Commented in #71 Implements compodoc to generate documentation for the library. It's working for me here: https://ngbat.github.io/robin-ui/docs/index.html

@jvandemo
Copy link
Owner

@RSginer — Great work, thank you.

Can you please push the following updates to your PR:

  • move instructions on how to build documentation from generators/app/templates/README.MD to README.md in the root of the generator (the instructions don't have to be in the generated readme file)
  • rename the title of the section from "Generate docs" to "Generating documentation for your library"
  • update the build:docs script from ./node_modules/.bin/compodoc -p tsconfig.json -n <%= props.libraryName %> -d docs --hideGenerator to compodoc -p tsconfig.json -n <%= props.libraryName %> -d docs --hideGenerator (there is no need to specify the node modules path if you use an npm script)
  • the text you added to the README seems to be prefixed with + symbols. Can you please remove the + symbols?

Then we can merge your changes.

If anything is unclear or you need help, don't hesitate to ask.

Thanks in advance!

…cript in package.json and add docs folder into npmignore
@RSginer
Copy link
Contributor Author

RSginer commented Apr 26, 2017

@jvandemo Everything is ready, sorry for the mistakes and thanks for the advice :)

commited in : 2ee2dbb

@jvandemo
Copy link
Owner

@RSginer — Thank you for the update.

I'm now seeing the following error when I try to run npm run build:docs:

[18:26:43] Provided source folder Object] was not found in the current directory

npm ERR! Darwin 16.0.0
npm ERR! argv "/Users/jvandemo/.nvm/versions/node/v6.10.0/bin/node" "/Users/jvandemo/.nvm/versions/node/v6.10.0/bin/npm" "run" "build:docs"
npm ERR! node v6.10.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! lib@0.1.0 build:docs: `compodoc -p tsconfig.json -n [object Object] -d docs --hideGenerator`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lib@0.1.0 build:docs script 'compodoc -p tsconfig.json -n [object Object] -d docs --hideGenerator'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the lib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     compodoc -p tsconfig.json -n [object Object] -d docs --hideGenerator
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs lib
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls lib
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jvandemo/Projects/test/lib/npm-debug.log

Here you can see that libraryName is an object:

libraryName: {
  original: props.libraryName,
  kebabCase: props.libraryName
}

so you will have to replace <%= props.libraryName %> with something like <%= props.libraryName.original %> in the build:docs script in _package.json.

Can you make that fix?

Thanks again!

@RSginer
Copy link
Contributor Author

RSginer commented Apr 26, 2017

@jvandemo oow sorry, now is fixed: 0f92a08

Thank you!! 😄

@jvandemo jvandemo merged commit 17d50e2 into jvandemo:master Apr 27, 2017
@jvandemo
Copy link
Owner

@RSginer — Perfect, thank you. Your PR has been merged and released as v9.1.0.

Thank you for your contribution, much appreciated! 👍

@jvandemo
Copy link
Owner

Quick update: I have added some convenience scripts to generate documentation and bundled them as npm run docs scripts:

  • npm run docs:build
  • npm run docs:serve
  • npm run docs:watch

For more info: https://github.com/jvandemo/generator-angular2-library#generating-documentation-for-your-library

@RSginer
Copy link
Contributor Author

RSginer commented Apr 27, 2017

@jvandemo I couldnt do it without your help :) I will try to help in everything I can. Thank you!

@jvandemo
Copy link
Owner

@RSginer — My pleasure, thank you for contributing 👍

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

Successfully merging this pull request may close these issues.

2 participants