Skip to content

Commit a685e67

Browse files
committed
Updated docs generation on README.md and npm run docs command
1 parent 7272027 commit a685e67

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,8 @@ However we have left the path alias configuration in `tsconfig.json`, `jest.conf
8383

8484
### Docs Generation
8585

86-
Remember to create `gh-pages` as an orphan branch first: `git checkout --orphan gh-pages`.
87-
8886
```sh
89-
typedoc --out /tmp/docs src
90-
git checkout gh-pages
91-
find . -mindepth 1 -maxdepth 1 ! -name ".git" -exec rm -r "{}" \;
92-
mv /tmp/docs/* .;
93-
touch .nojekyll
94-
git commit -am "Updated Docs";
95-
git push
87+
npm run docs
9688
```
9789

9890
See the docs at: https://matrixai.github.io/TypeScript-Demo-Lib/

docs/classes/lib_library.default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ <h3>constructor</h3>
107107
<li class="tsd-description">
108108
<aside class="tsd-sources">
109109
<ul>
110-
<li>Defined in <a href="https://github.com/MatrixAI/TypeScript-Demo-Lib/blob/b9cfbf5/src/lib/Library.ts#L2">lib/Library.ts:2</a></li>
110+
<li>Defined in <a href="https://github.com/MatrixAI/TypeScript-Demo-Lib/blob/7272027/src/lib/Library.ts#L2">lib/Library.ts:2</a></li>
111111
</ul>
112112
</aside>
113113
<h4 class="tsd-parameters-title">Parameters</h4>
@@ -129,7 +129,7 @@ <h3>some<wbr>Param</h3>
129129
<div class="tsd-signature tsd-kind-icon">some<wbr>Param<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
130130
<aside class="tsd-sources">
131131
<ul>
132-
<li>Defined in <a href="https://github.com/MatrixAI/TypeScript-Demo-Lib/blob/b9cfbf5/src/lib/Library.ts#L2">lib/Library.ts:2</a></li>
132+
<li>Defined in <a href="https://github.com/MatrixAI/TypeScript-Demo-Lib/blob/7272027/src/lib/Library.ts#L2">lib/Library.ts:2</a></li>
133133
</ul>
134134
</aside>
135135
</section>

docs/index.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,7 @@ <h3>Path Aliases</h3>
123123
<a href="#docs-generation" id="docs-generation" style="color: inherit; text-decoration: none;">
124124
<h3>Docs Generation</h3>
125125
</a>
126-
<p>Remember to create <code>gh-pages</code> as an orphan branch first: <code>git checkout --orphan gh-pages</code>.</p>
127-
<pre><code class="language-sh"><span style="color: #000000">typedoc --out /tmp/docs src</span>
128-
<span style="color: #000000">git checkout gh-pages</span>
129-
<span style="color: #000000">find </span><span style="color: #795E26">.</span><span style="color: #000000"> -mindepth 1 -maxdepth 1 ! -name </span><span style="color: #A31515">&quot;.git&quot;</span><span style="color: #000000"> -exec rm -r </span><span style="color: #A31515">&quot;{}&quot;</span><span style="color: #000000"> </span><span style="color: #EE0000">\;</span>
130-
<span style="color: #000000">mv /tmp/docs/* </span><span style="color: #795E26">.</span><span style="color: #000000">;</span>
131-
<span style="color: #000000">touch .nojekyll</span>
132-
<span style="color: #000000">git commit -am </span><span style="color: #A31515">&quot;Updated Docs&quot;</span><span style="color: #000000">;</span>
133-
<span style="color: #000000">git push</span>
126+
<pre><code class="language-sh"><span style="color: #000000">npm run docs</span>
134127
</code></pre>
135128
<p>See the docs at: <a href="https://matrixai.github.io/TypeScript-Demo-Lib/">https://matrixai.github.io/TypeScript-Demo-Lib/</a></p>
136129
<a href="#publishing" id="publishing" style="color: inherit; text-decoration: none;">

docs/modules/bin_typescript_demo_lib.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h3>default</h3>
9090
<li class="tsd-description">
9191
<aside class="tsd-sources">
9292
<ul>
93-
<li>Defined in <a href="https://github.com/MatrixAI/TypeScript-Demo-Lib/blob/b9cfbf5/src/bin/typescript-demo-lib.ts#L7">bin/typescript-demo-lib.ts:7</a></li>
93+
<li>Defined in <a href="https://github.com/MatrixAI/TypeScript-Demo-Lib/blob/7272027/src/bin/typescript-demo-lib.ts#L7">bin/typescript-demo-lib.ts:7</a></li>
9494
</ul>
9595
</aside>
9696
<h4 class="tsd-parameters-title">Parameters</h4>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"test": "jest",
2020
"lint": "eslint '{src,tests}/**/*.{js,ts}'",
2121
"lintfix": "eslint '{src,tests}/**/*.{js,ts}' --fix",
22+
"docs": "typedoc --out ./docs src && touch ./docs/.nojekyll",
2223
"typescript-demo-lib": "ts-node -r tsconfig-paths/register src/bin/typescript-demo-lib.ts"
2324
},
2425
"dependencies": {

0 commit comments

Comments
 (0)