updated readme
This commit is contained in:
14
README.md
14
README.md
@ -1,6 +1,6 @@
|
|||||||
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
|
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url]
|
||||||
|
|
||||||
> A tool to create Word Documents (.docx) with JS
|
> A tool to create Word Documents (.docx) with JS or TS, written in TS.
|
||||||
|
|
||||||
[](https://nodei.co/npm/docx/)
|
[](https://nodei.co/npm/docx/)
|
||||||
|
|
||||||
@ -47,14 +47,16 @@ $ npm install --save docx
|
|||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var officeClippy = require('docx');
|
|
||||||
|
|
||||||
// Used to create docx files
|
// Used to create docx files
|
||||||
var docx = require('docx');
|
var docx = require('docx');
|
||||||
|
|
||||||
// Used to export the file into a .docx file
|
// Create document
|
||||||
// var exporter = officeClippy.exporter;
|
var doc = new docx.Document();
|
||||||
|
|
||||||
|
// Used to export the file into a .docx file
|
||||||
|
// res is express' Response object
|
||||||
|
var exporter = new docx.ExpressPacker(doc, res);
|
||||||
|
var exporter = new docx.LocalPacker(doc);
|
||||||
```
|
```
|
||||||
## Create simple Word Document
|
## Create simple Word Document
|
||||||
```js
|
```js
|
||||||
@ -360,6 +362,8 @@ Would produce:
|
|||||||
|
|
||||||
***5th Dec 2015***
|
***5th Dec 2015***
|
||||||
|
|
||||||
|
Made with 💖 by Dolan Miu 🍆 💦 😝
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
MIT © [Dolan Miu](http://www.dolan.bio)
|
MIT © [Dolan Miu](http://www.dolan.bio)
|
||||||
|
Reference in New Issue
Block a user