aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 61a37d8..a559d6c 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,18 @@ Where `custom-style-map` looks something like:
### Library
+In node.js, mammoth can be required in the usual way:
+
+```javascript
+var mammoth = require("mammoth");
+```
+
+To generate a standalone JavaScript file for the browser,
+use `mammoth.browser.js` (generate using `make setup` if it is not already present).
+This uses any loaded module system.
+If no module system is found,
+`mammoth` is set as a window global.
+
#### Basic conversion
To convert an existing .docx file to HTML, use `mammoth.convertToHtml`: