Skip to content

Commit 2aa72ca

Browse files
author
Brandon Tilley
committed
(site) Update CommonJS installation instructions
1 parent d873121 commit 2aa72ca

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

site/public/documentation/installation.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@ requirejs(['planetaryjs'], function(planetaryjs) {
6464
CommonJS
6565
--------
6666

67-
<div class='ui red raised segment'>
68-
There is [a pull request](https://github.com/mbostock/topojson/pull/129) open on the TopoJSON project to make this process more intuitive; these instructions will be updated based on its acceptance.
69-
</div>
70-
71-
First, install `browserify` and `brfs` from npm (as well as `planetary.js`, if you haven't already). Then, create your application (here referred to as `app.js`) and bundle it with browserify, running the dependencies through brfs.
67+
First, install `browserify` from npm (as well as `planetary.js` v1.0.2+, if you haven't already). Then, create your application (here referred to as `app.js`) and bundle it with browserify.
7268

7369
<div class='ui raised segment'>
7470
<div class='ui red ribbon label'>JavaScript</div>
@@ -84,9 +80,18 @@ planet.draw(canvas);
8480
<div class='ui purple ribbon label'>Shell</div>
8581

8682
```shell
87-
$ npm install browserify brfs
88-
$ ./node_modules/.bin/browserify --g brfs app.js > bundle.js
83+
$ npm install browserify
84+
$ ./node_modules/.bin/browserify app.js > bundle.js
8985
```
9086
</div>
9187

92-
`bundle.js` is now ready to use!
88+
`bundle.js` is now ready to use! You may need to set the `charset` option on your script tag:
89+
90+
91+
<div class='ui raised segment'>
92+
<div class='ui blue ribbon label'>HTML</div>
93+
94+
```html
95+
<script type='text/javascript' src='bundle.js' charset='utf-8'></script>
96+
```
97+
</div>

0 commit comments

Comments
 (0)