Update docs on importing module

This commit is contained in:
Prateeksha Singh 2017-11-04 23:10:36 +05:30 committed by pratu16x7
parent 3a52a56171
commit 0bea3bbb78
2 changed files with 13 additions and 4 deletions

View File

@ -32,6 +32,12 @@
```console
$ npm install frappe-charts
```
and include in your project:
```js
import Chart from "frappe-charts"
```
* ...or include within your HTML
```html
@ -78,4 +84,5 @@ If you want to contribute:
This repository has been released under the [MIT License](LICENSE)
------------------
Made with ♥ by [pratu16x7](https://github.com/pratu16x7). Project maintained by [frappe](https://github.com/frappe)
Made with ♥ by [pratu16x7](https://github.com/pratu16x7). Awesome logo by [raghukamath](https://github.com/raghukamath).
Project maintained by [frappe](https://github.com/frappe).

View File

@ -49,9 +49,11 @@
Create a chart
</h6>
<p class="step-explain">Install</p>
<pre><code class="hljs html"> npm install frappe-charts</code></pre>
<p class="step-explain">Include it in your HTML</p>
<pre><code class="hljs html"> &lt;script src="frappe-charts.min.js" /&gt;</code></pre>
<pre><code class="hljs console"> npm install frappe-charts</code></pre>
<p class="step-explain">And include it in your project</p>
<pre><code class="hljs javascript"> import Chart from "frappe-charts"</code></pre>
<p class="step-explain">... or include it directly in your HTML</p>
<pre><code class="hljs html"> &lt;script src="https://unpkg.com/frappe-charts@0.0.3/dist/frappe-charts.min.iife.js" /&gt;</code></pre>
<p class="step-explain">Make a new Chart</p>
<pre><code class="hljs html"> &lt!--HTML--&gt;
&lt;div id="chart"&gt;&lt;/div&gt;</code></pre>