@hyperlex/mammoth 1.4.9-beta
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/.eslintrc.json +77 -0
- package/.github/ISSUE_TEMPLATE.md +12 -0
- package/.idea/mammoth.js.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.travis.yml +10 -0
- package/LICENSE +22 -0
- package/NEWS +373 -0
- package/README.md +883 -0
- package/bin/mammoth +38 -0
- package/browser/docx/files.js +14 -0
- package/browser/unzip.js +12 -0
- package/lib/document-to-html.js +453 -0
- package/lib/documents.js +238 -0
- package/lib/docx/body-reader.js +636 -0
- package/lib/docx/comments-reader.js +31 -0
- package/lib/docx/content-types-reader.js +58 -0
- package/lib/docx/document-xml-reader.js +26 -0
- package/lib/docx/docx-reader.js +222 -0
- package/lib/docx/files.js +67 -0
- package/lib/docx/notes-reader.js +28 -0
- package/lib/docx/numbering-xml.js +69 -0
- package/lib/docx/office-xml-reader.js +58 -0
- package/lib/docx/relationships-reader.js +43 -0
- package/lib/docx/style-map.js +75 -0
- package/lib/docx/styles-reader.js +70 -0
- package/lib/docx/uris.js +21 -0
- package/lib/html/ast.js +50 -0
- package/lib/html/index.js +41 -0
- package/lib/html/simplify.js +88 -0
- package/lib/images.js +29 -0
- package/lib/index.js +115 -0
- package/lib/main.js +63 -0
- package/lib/options-reader.js +98 -0
- package/lib/promises.js +42 -0
- package/lib/results.js +72 -0
- package/lib/style-reader.js +321 -0
- package/lib/styles/document-matchers.js +74 -0
- package/lib/styles/html-paths.js +81 -0
- package/lib/styles/parser/tokeniser.js +30 -0
- package/lib/transforms.js +61 -0
- package/lib/underline.js +11 -0
- package/lib/unzip.js +22 -0
- package/lib/writers/html-writer.js +160 -0
- package/lib/writers/index.js +14 -0
- package/lib/writers/markdown-writer.js +163 -0
- package/lib/xml/index.js +7 -0
- package/lib/xml/nodes.js +69 -0
- package/lib/xml/reader.js +83 -0
- package/lib/xml/writer.js +61 -0
- package/lib/zipfile.js +77 -0
- package/mammoth.browser.js +32950 -0
- package/mammoth.browser.min.js +18 -0
- package/package.json +65 -0
- package/test/.eslintrc.json +7 -0
- package/test/document-to-html.tests.js +834 -0
- package/test/docx/body-reader.tests.js +1342 -0
- package/test/docx/comments-reader.tests.js +52 -0
- package/test/docx/content-types-reader.tests.js +45 -0
- package/test/docx/document-matchers.js +37 -0
- package/test/docx/docx-reader.tests.js +179 -0
- package/test/docx/files.tests.js +94 -0
- package/test/docx/notes-reader.tests.js +35 -0
- package/test/docx/numbering-xml.tests.js +65 -0
- package/test/docx/office-xml-reader.tests.js +24 -0
- package/test/docx/relationships-reader.tests.js +65 -0
- package/test/docx/style-map.tests.js +112 -0
- package/test/docx/styles-reader.tests.js +133 -0
- package/test/docx/uris.tests.js +22 -0
- package/test/html/simplify.tests.js +134 -0
- package/test/html/write.tests.js +42 -0
- package/test/images.tests.js +34 -0
- package/test/main.tests.js +89 -0
- package/test/mammoth.tests.js +429 -0
- package/test/mocha.opts +1 -0
- package/test/options-reader.tests.js +63 -0
- package/test/results.tests.js +15 -0
- package/test/style-reader.tests.js +256 -0
- package/test/styles/document-matchers.tests.js +71 -0
- package/test/styles/html-paths.tests.js +20 -0
- package/test/styles/parser/tokeniser.tests.js +104 -0
- package/test/test-data/comments.docx +0 -0
- package/test/test-data/embedded-style-map.docx +0 -0
- package/test/test-data/empty.docx +0 -0
- package/test/test-data/empty.zip +0 -0
- package/test/test-data/endnotes.docx +0 -0
- package/test/test-data/external-picture.docx +0 -0
- package/test/test-data/footnote-hyperlink.docx +0 -0
- package/test/test-data/footnotes.docx +0 -0
- package/test/test-data/hello.zip +0 -0
- package/test/test-data/hyperlinks/word/_rels/document.xml.rels +10 -0
- package/test/test-data/hyperlinks/word/document.xml +18 -0
- package/test/test-data/simple/word/document.xml +18 -0
- package/test/test-data/simple-list.docx +0 -0
- package/test/test-data/single-paragraph.docx +0 -0
- package/test/test-data/strikethrough.docx +0 -0
- package/test/test-data/tables.docx +0 -0
- package/test/test-data/text-box.docx +0 -0
- package/test/test-data/tiny-picture-target-base-relative.docx +0 -0
- package/test/test-data/tiny-picture.docx +0 -0
- package/test/test-data/tiny-picture.png +0 -0
- package/test/test-data/underline.docx +0 -0
- package/test/test-data/utf8-bom.docx +0 -0
- package/test/test.js +11 -0
- package/test/testing.js +55 -0
- package/test/transforms.tests.js +125 -0
- package/test/unzip.tests.js +38 -0
- package/test/writers/html-writer.tests.js +133 -0
- package/test/writers/markdown-writer.tests.js +304 -0
- package/test/xml/reader.tests.js +85 -0
- package/test/xml/writer.tests.js +81 -0
- package/test/zipfile.tests.js +59 -0
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hyperlex/mammoth",
|
|
3
|
+
"version": "1.4.9-beta",
|
|
4
|
+
"author": "Michael Williamson <mike@zwobble.org>",
|
|
5
|
+
"description": "Convert Word documents from docx to simple HTML and Markdown",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"docx",
|
|
8
|
+
"html",
|
|
9
|
+
"office",
|
|
10
|
+
"word",
|
|
11
|
+
"markdown",
|
|
12
|
+
"md"
|
|
13
|
+
],
|
|
14
|
+
"main": "./lib/index.js",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/hyperlex/mammoth.js.git"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"argparse": "~1.0.3",
|
|
21
|
+
"bluebird": "~3.4.0",
|
|
22
|
+
"jszip": "~2.5.0",
|
|
23
|
+
"lop": "~0.4.1",
|
|
24
|
+
"path-is-absolute": "^1.0.0",
|
|
25
|
+
"sax": "~1.1.1",
|
|
26
|
+
"underscore": "~1.13.1",
|
|
27
|
+
"xmlbuilder": "^10.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"browserify": "~13.0.1",
|
|
31
|
+
"browserify-prepend-licenses": "~1.0.0",
|
|
32
|
+
"duck": "~0.1.12",
|
|
33
|
+
"eslint": "^7.28.0",
|
|
34
|
+
"hamjest": "^3.7.2",
|
|
35
|
+
"mocha": "~7.2.0",
|
|
36
|
+
"temp": "~0.9.4",
|
|
37
|
+
"uglify-js": "~2.8.29"
|
|
38
|
+
},
|
|
39
|
+
"browser": {
|
|
40
|
+
"./lib/unzip.js": "./browser/unzip.js",
|
|
41
|
+
"./lib/docx/files.js": "./browser/docx/files.js"
|
|
42
|
+
},
|
|
43
|
+
"bin": {
|
|
44
|
+
"mammoth": "bin/mammoth"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"pretest": "eslint lib test",
|
|
48
|
+
"test": "mocha 'test/**/*.tests.js'",
|
|
49
|
+
"prepublish": "make mammoth.browser.min.js"
|
|
50
|
+
},
|
|
51
|
+
"license": "BSD-2-Clause",
|
|
52
|
+
"resolutions": {
|
|
53
|
+
"underscore": "~1.13.1",
|
|
54
|
+
"elliptic": "~6.5.4",
|
|
55
|
+
"minimist": "~1.2.5"
|
|
56
|
+
},
|
|
57
|
+
"bugs": {
|
|
58
|
+
"url": "https://github.com/hyperlex/mammoth.js/issues"
|
|
59
|
+
},
|
|
60
|
+
"homepage": "https://github.com/hyperlex/mammoth.js#readme",
|
|
61
|
+
"directories": {
|
|
62
|
+
"lib": "lib",
|
|
63
|
+
"test": "test"
|
|
64
|
+
}
|
|
65
|
+
}
|