Deploy dolanmiu/docx to github.com/dolanmiu/docx.git:gh-pages

This commit is contained in:
Deployment Bot (from Travis CI)
2018-08-04 03:06:09 +00:00
parent 14c098a5bb
commit d602fe7407
427 changed files with 3926 additions and 3928 deletions

View File

@ -3,30 +3,50 @@
</p>
<p align="center">
Easily generate .docx files with JS/TS.
Easily generate .docx files with JS/TS. :100:
</p>
---
# Welcome
## Getting Started
### Installation
## Installation
```sh
$ npm install --save docx
npm install --save docx
```
Then you can `require` or `import` as usual:
```
```js
let docx = require('docx');
```
```
```js
import * as docx from 'docx'
```
## Basic Usage
```js
var docx = require("docx");
// Create document
var doc = new docx.Document();
// Add some content in the document
var paragraph = new docx.Paragraph("Some cool text here.");
// Add more text into the paragraph if you wish
paragraph.addRun(new docx.TextRun("Lorem Ipsum Foo Bar"));
doc.addParagraph(paragraph);
// Used to export the file into a .docx file
var exporter = new docx.LocalPacker(doc);
exporter.pack("My First Document");
// Done! A file called 'My First Document.docx' will be in your file system if you used LocalPacker
```
---