Add section on installing from npm.

This commit is contained in:
Don McCurdy 2018-01-13 16:39:28 -08:00 committed by GitHub
parent c83d4ce46a
commit e2589bdf6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,17 @@ In your `head` tag, include the following code:
<script type="text/javascript" src="dat.gui.min.js"></script> <script type="text/javascript" src="dat.gui.min.js"></script>
``` ```
## Installing from npm
```
$ npm install --save dat.gui
```
```js
const dat = require('dat.gui').default;
const gui = new dat.GUI();
```
## Directory Contents ## Directory Contents
``` ```
@ -49,4 +60,4 @@ The following libraries / open-source projects were used in the development of d
* [webpack](https://webpack.github.io/) * [webpack](https://webpack.github.io/)
* [Sass](http://sass-lang.com/) * [Sass](http://sass-lang.com/)
* [node.js](http://nodejs.org/) * [node.js](http://nodejs.org/)
* [QUnit](https://github.com/jquery/qunit) / [jquery](http://jquery.com/) * [QUnit](https://github.com/jquery/qunit) / [jquery](http://jquery.com/)