Skip to content

Commit 2ee2dbb

Browse files
committed
refactor: move and correct how to generate docs, fix the build:docs script in package.json and add docs folder into npmignore
1 parent c808b24 commit 2ee2dbb

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,15 @@ This will generate a `dist` directory with:
107107
- `*.d.ts`: type definitions for you library
108108
- `sample-library.metadata.json`: metadata for your library to support AOT compilation
109109

110+
## Generating documentation for your library
111+
112+
From the root of your library directory, run:
113+
114+
```bash
115+
$ npm run build:docs
116+
```
117+
This will generate a `docs` directory with all documentation of your library
118+
110119
## Publishing your library to NPM
111120

112121
To publish your library to NPM, first generate the `dist` directory:

generators/app/templates/README.MD

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ Once your library is imported, you can use its components, directives and pipes
5353
<sampleComponent></sampleComponent>
5454
```
5555

56-
+## Generate docs
57-
+
58-
+From the root of your library directory, run:
59-
+
60-
+```bash
61-
+$ npm run build:docs
62-
+```
63-
+This will generate a `docs` directory with all documentation of your library
64-
+
6556
## Development
6657

6758
To generate all `*.js`, `*.d.ts` and `*.metadata.json` files:

generators/app/templates/_package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"scripts": {
55
"build": "gulp build",
66
"build:watch": "gulp",
7-
"build:docs": "./node_modules/.bin/compodoc -p tsconfig.json -n <%= props.libraryName %> -d docs --hideGenerator",
7+
"build:docs": "compodoc -p tsconfig.json -n <%= props.libraryName %> -d docs --hideGenerator",
88
"lint": "tslint --type-check --project tsconfig.json src/**/*.ts",
99
"test": "tsc && karma start"
1010
},

generators/app/templates/npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Node
22
node_modules/*
33
npm-debug.log
4-
4+
docs/*
55
# DO NOT IGNORE TYPESCRIPT FILES FOR NPM
66
# TypeScript
77
# *.js

0 commit comments

Comments
 (0)