Skip to content

Commit 91052c0

Browse files
committed
README: Updated to include demo development instructions
1 parent 9ccee40 commit 91052c0

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,26 @@ To run the demo on a different port, set the `PORT` environmental variable. For
9393

9494
TAG is written in ES6, and uses [Sass](https://sass-lang.com/) for its styles.
9595

96-
Assuming you've cloned the repository, simply run `npm install && npm run build` to install dependencies and transpile the source to ES2015.
96+
Assuming you've cloned the repository and installed its dependencies, run `npm run build` to transpile the source to ES2015 and generate the library bundles (`dist/tag`) and documentation (`docs`).
97+
98+
To rebuild the sources for the demo, run `npm run demo-build`.
9799

98100
### Live monitoring of changes
99101

100-
For convenience, you can monitor changes to the library's sources (css + js) with the following `npm` task:
102+
For convenience, you can monitor changes to the library's sources (in the `src` folder) with the following `npm` task, which will regenerate the files in the `dist/tag` folder:
101103

102104
```
103105
npm run watch
104106
```
105107

108+
If you are experimenting with the demo and would like to monitor changes to the demo sources (in the `demo` folder), use the following `npm` task instead:
109+
110+
```
111+
npm run demo-watch
112+
```
113+
114+
The `demo-watch` task will also catch changes to the library sources and rebuild the demo bundles, but it will *not* directly rebuild the library bundles in `dist/tag`, so be sure to run `npm run build` separately if you intend to redistribute/repackage your changes to the library sources.
115+
106116
### Generating documentation
107117

108118
TAG uses [JSDoc](http://usejsdoc.org/) to generate its documentation. By default, the documentation is generated using the template in `src/jsdoc-template` (adapted from the [Braintree JSDoc Template](https://github.com/braintree/jsdoc-template)) and stored in the `docs` folder.

docs/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ <h3>Demo</h3><p>After cloning the repository and installing the project dependen
135135
<p>To run the demo on a different port, set the <code>PORT</code> environmental variable. For example, running <code>PORT=9000 npm run demo</code> will start the demo server on <code>localhost:9000</code> instead.</p>
136136
<h3>Building the source</h3><p>TAG is written in ES6, and uses <a href="https://sass-lang.com/">Sass</a> for its styles.</p>
137137
<p>Assuming you've cloned the repository, simply run <code>npm install &amp;&amp; npm run build</code> to install dependencies and transpile the source to ES2015.</p>
138-
<h3>Live monitoring of changes</h3><p>For convenience, you can monitor changes to the library's sources (css + js) with the following <code>npm</code> task: </p>
139-
<pre class="prettyprint source"><code>npm run watch</code></pre><h3>Generating documentation</h3><p>TAG uses <a href="http://usejsdoc.org/">JSDoc</a> to generate its documentation. By default, the documentation is generated using the template in <code>src/jsdoc-template</code> (adapted from the <a href="https://github.com/braintree/jsdoc-template">Braintree JSDoc Template</a>) and stored in the <code>docs</code> folder.</p>
138+
<h3>Live monitoring of changes</h3><p>For convenience, you can monitor changes to the library's sources (in the <code>src</code> folder) with the following <code>npm</code> task, which will regenerate the files in the <code>dist/tag</code> folder.</p>
139+
<pre class="prettyprint source"><code>npm run watch</code></pre><p>If you are experimenting with the demo and would like to monitor changes to the demo sources (in the <code>demo</code> folder), use the following <code>npm</code> task instead:</p>
140+
<pre class="prettyprint source"><code>npm run demo-watch</code></pre><p>The <code>demo-watch</code> task will also catch changes to the library sources and rebuild the demo bundles, but it will <em>not</em> directly regenerate the library bundles in <code>dist/tag</code>.</p>
141+
<h3>Generating documentation</h3><p>TAG uses <a href="http://usejsdoc.org/">JSDoc</a> to generate its documentation. By default, the documentation is generated using the template in <code>src/jsdoc-template</code> (adapted from the <a href="https://github.com/braintree/jsdoc-template">Braintree JSDoc Template</a>) and stored in the <code>docs</code> folder.</p>
140142
<p>To regenerate the documentation, use the following <code>npm</code> task:</p>
141143
<pre class="prettyprint source"><code>npm run generate-docs</code></pre>
142144
</article>

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
"build": "run build:all",
99
"quick": "run build:quick",
1010
"watch": "run watch:quick",
11-
"demo-build": "run demo:build:all && run demo:run",
1211
"demo": "run demo:run",
12+
"demo-build": "run demo:build:all",
13+
"demo-watch": "run demo:watch:all",
1314
"generate-docs": "run build:app:docs:all"
1415
},
1516
"repository": {

0 commit comments

Comments
 (0)