Skip to content

Commit

Permalink
feat(compodoc): add compodoc for generating documentation (#76)
Browse files Browse the repository at this point in the history
* feat(compodoc): generate angular documentation

* doc(README): add how to generate docs

* doc(README): correct how to generate docs

* refactor: move and correct how to generate docs, fix the build:docs script in package.json and add docs folder into npmignore

* fix(package): dynamic library name generating docs

* fix(package): dynamic library name on build:docs
  • Loading branch information
RSginer authored and jvandemo committed Apr 27, 2017
1 parent 52ce370 commit 17d50e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,15 @@ This will generate a `dist` directory with:
- `*.d.ts`: type definitions for you library
- `sample-library.metadata.json`: metadata for your library to support AOT compilation

## Generating documentation for your library

From the root of your library directory, run:

```bash
$ npm run build:docs
```
This will generate a `docs` directory with all documentation of your library

## Publishing your library to NPM

To publish your library to NPM, first generate the `dist` directory:
Expand Down
2 changes: 2 additions & 0 deletions generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"scripts": {
"build": "gulp build",
"build:watch": "gulp",
"build:docs": "compodoc -p tsconfig.json -n <%= props.libraryName.original %> -d docs --hideGenerator",
"lint": "tslint --type-check --project tsconfig.json src/**/*.ts",
"test": "tsc && karma start"
},
Expand All @@ -29,6 +30,7 @@
"@angular/core": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@compodoc/compodoc": "^1.0.0-beta.7",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Node
node_modules/*
npm-debug.log

docs/*
# DO NOT IGNORE TYPESCRIPT FILES FOR NPM
# TypeScript
# *.js
Expand Down

0 comments on commit 17d50e2

Please sign in to comment.