docx-plus 0.1.7 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  # docx-plus
2
2
 
3
- [![NPM version][npm-image]][npm-url]
4
- [![Downloads per month][downloads-image]][downloads-url]
5
- [![GitHub Action Workflow Status][github-actions-workflow-image]][github-actions-workflow-url]
6
- [![PRs Welcome][pr-image]][pr-url]
3
+ ![npm version](https://img.shields.io/npm/v/docx-plus)
4
+ ![npm downloads](https://img.shields.io/npm/dw/docx-plus)
5
+ ![npm license](https://img.shields.io/npm/l/docx-plus)
7
6
 
8
- Easily generate and modify .docx files with JS/TS. Works for Node and on the Browser.
7
+ > Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
9
8
 
10
- **docx-plus** is an enhanced fork of [docx](https://github.com/dolanmiu/docx) — a TypeScript/JavaScript library for generating and modifying Word documents (.docx) programmatically with a declarative API.
9
+ **docx-plus** is an enhanced fork of [docx](https://github.com/dolanmiu/docx) by Dolan Miu — a TypeScript/JavaScript library for generating and modifying Word documents (.docx) programmatically with a declarative API. We extend our sincere gratitude to the original author and all contributors for their foundational work.
10
+
11
+ This package re-exports everything from `@office-open/docx` for backward compatibility. If you are starting a new project, we recommend using `@office-open/docx` directly.
11
12
 
12
13
  ## What's Different from docx?
13
14
 
@@ -46,7 +47,7 @@ Easily generate and modify .docx files with JS/TS. Works for Node and on the Bro
46
47
  | Math advanced | Basic math only | **Complete** (box, borderBox, eqArr, groupChr, matrix, phant, accent, fraction, nAry, func, delim, bar, limLow, limUpp, sPre, sSub, sSup) |
47
48
  | Group Shape | Basic (transform only) | **Enhanced** (fill, effects, `chOff`/`chExt` child coordinates) |
48
49
  | Test environment | jsdom | happy-dom |
49
- | OOXML compliance | ECMA-376 (legacy) | **ISO/IEC 29500-4** (latest) — comprehensive WordprocessingML, DrawingML, and Shared Math coverage; see scope notes below |
50
+ | OOXML compliance | ECMA-376 (legacy) | **ISO/IEC 29500-4** (latest) — comprehensive WordprocessingML, DrawingML, and Shared Math coverage |
50
51
 
51
52
  ## OOXML Coverage
52
53
 
@@ -63,21 +64,19 @@ Easily generate and modify .docx files with JS/TS. Works for Node and on the Bro
63
64
 
64
65
  ## Installation
65
66
 
66
- ```terminal
67
- npm install --save docx-plus
68
- ```
67
+ ```bash
68
+ # Install with npm
69
+ $ npm install docx-plus
69
70
 
70
- ```ts
71
- import * as docx from "docx-plus";
72
- // or
73
- import { Document, Packer, Paragraph, TextRun } from "docx-plus";
71
+ # Install with pnpm
72
+ $ pnpm add docx-plus
74
73
  ```
75
74
 
76
- ## Quick Example
75
+ ## Quick Start
77
76
 
78
- ```ts
79
- import * as fs from "fs";
80
- import { Document, Packer, Paragraph, TextRun } from "docx-plus";
77
+ ```typescript
78
+ import { Document, Paragraph, TextRun, Packer } from "docx-plus";
79
+ import { writeFileSync } from "node:fs";
81
80
 
82
81
  const doc = new Document({
83
82
  sections: [
@@ -98,28 +97,13 @@ const doc = new Document({
98
97
  });
99
98
 
100
99
  const buffer = await Packer.toBuffer(doc);
101
- fs.writeFileSync("My Document.docx", buffer);
100
+ writeFileSync("My Document.docx", buffer);
102
101
  ```
103
102
 
104
- ## Documentation
105
-
106
- Please refer to the [documentation](https://github.com/DemoMacro/docx-plus#readme) for details on how to use this library, examples and much more!
107
-
108
103
  ## Examples
109
104
 
110
- Check the [demo folder](https://github.com/DemoMacro/docx-plus/tree/master/demo) for 110+ working examples covering every feature.
111
-
112
- ## Contributing
113
-
114
- Contributions are welcome! Please feel free to submit pull requests.
105
+ Check the [demo folder](../docx/demo) for 100+ working examples covering every feature.
115
106
 
116
- ---
107
+ ## License
117
108
 
118
- [npm-image]: https://badge.fury.io/js/docx-plus.svg
119
- [npm-url]: https://npmjs.org/package/docx-plus
120
- [downloads-image]: https://img.shields.io/npm/dm/docx-plus.svg
121
- [downloads-url]: https://npmjs.org/package/docx-plus
122
- [github-actions-workflow-image]: https://github.com/DemoMacro/docx-plus/workflows/Default/badge.svg?branch=main
123
- [github-actions-workflow-url]: https://github.com/DemoMacro/docx-plus/actions
124
- [pr-image]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
125
- [pr-url]: http://makeapullrequest.com
109
+ - [MIT](LICENSE) © [Demo Macro](https://imst.xyz/)