Improve spelling and prettier commands
This commit is contained in:
@ -4,14 +4,13 @@
|
||||
"version": "0.2",
|
||||
// language - current active spelling language
|
||||
"language": "en_US",
|
||||
"dictionaries": ["en_US", "typescript", "softwareTerms", "fonts"],
|
||||
"dictionaries": ["en_US", "typescript", "softwareTerms", "fonts", "npm"],
|
||||
// words - list of words to be always considered correct
|
||||
"words": [
|
||||
"Xmlable",
|
||||
"twip",
|
||||
"twips",
|
||||
"jsonify",
|
||||
"Media",
|
||||
"falsey",
|
||||
"aiueo",
|
||||
"iroha",
|
||||
@ -31,7 +30,8 @@
|
||||
"NUMPAGES",
|
||||
"ATLEAST",
|
||||
"ooxml",
|
||||
"clippy"
|
||||
"clippy",
|
||||
"docsify"
|
||||
],
|
||||
"ignoreRegExpList": [
|
||||
"/\"w:.+\"/",
|
||||
@ -49,7 +49,7 @@
|
||||
"\\.to\\.include\\.members\\(\\[[^\\]]+]\\)",
|
||||
"/new [a-zA-Z]+\\({[^£]+}\\)/g"
|
||||
],
|
||||
"ignorePaths": ["package.json"],
|
||||
"ignorePaths": ["package.json", "docs/api"],
|
||||
"allowCompoundWords": true,
|
||||
// flagWords - list of words to be always considered incorrect
|
||||
// This is useful for offensive words and common spelling errors.
|
||||
|
@ -52,18 +52,20 @@ const table = new Table({
|
||||
});
|
||||
|
||||
const doc = new Document({
|
||||
numbering:{
|
||||
config:[{
|
||||
reference: 'ref1',
|
||||
numbering: {
|
||||
config: [
|
||||
{
|
||||
reference: "ref1",
|
||||
levels: [
|
||||
{
|
||||
level: 0,
|
||||
format: LevelFormat.DECIMAL,
|
||||
text: '%1)',
|
||||
text: "%1)",
|
||||
start: 50,
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
}]
|
||||
},
|
||||
styles: {
|
||||
default: {
|
||||
@ -184,11 +186,11 @@ const doc = new Document({
|
||||
spacing: { line: 276, before: 20 * 72 * 0.1, after: 20 * 72 * 0.05 },
|
||||
rightTabStop: TabStopPosition.MAX,
|
||||
leftTabStop: 453.543307087,
|
||||
numbering : {
|
||||
reference: 'ref1',
|
||||
numbering: {
|
||||
reference: "ref1",
|
||||
instance: 0,
|
||||
level: 0,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -34,8 +34,7 @@ const doc = new Document({
|
||||
new TableCell({
|
||||
children: [
|
||||
new Paragraph({
|
||||
text:
|
||||
"Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah",
|
||||
text: "Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah",
|
||||
heading: HeadingLevel.HEADING_1,
|
||||
}),
|
||||
],
|
||||
|
@ -123,8 +123,7 @@ const noBorderTable = new Table({
|
||||
new TableCell({
|
||||
children: [
|
||||
new Paragraph({
|
||||
text:
|
||||
"Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah",
|
||||
text: "Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah",
|
||||
heading: HeadingLevel.HEADING_1,
|
||||
}),
|
||||
],
|
||||
|
@ -43,8 +43,7 @@ const doc = new Document({
|
||||
style: "strong",
|
||||
}),
|
||||
new TextRun({
|
||||
text:
|
||||
" - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
|
||||
text: " - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
@ -121,7 +121,7 @@ const doc = new Document({
|
||||
author: "Firstname Lastname",
|
||||
date: "2020-10-06T09:05:00Z",
|
||||
bold: false,
|
||||
}
|
||||
},
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
@ -4,7 +4,7 @@ import * as fs from "fs";
|
||||
import { Bookmark, Document, Packer, Paragraph, SimpleField, TextRun } from "../build";
|
||||
|
||||
const doc = new Document({
|
||||
creator: 'Me',
|
||||
creator: "Me",
|
||||
sections: [
|
||||
{
|
||||
properties: {},
|
||||
|
@ -13,11 +13,13 @@ const doc = new Document({
|
||||
},
|
||||
},
|
||||
children: [
|
||||
new Paragraph({ children: [
|
||||
new TextRun('This text will be in the first column.'),
|
||||
new Paragraph({
|
||||
children: [
|
||||
new TextRun("This text will be in the first column."),
|
||||
new ColumnBreak(),
|
||||
new TextRun('This text will be in the second column.'),
|
||||
] }),
|
||||
new TextRun("This text will be in the second column."),
|
||||
],
|
||||
}),
|
||||
],
|
||||
},
|
||||
],
|
||||
|
@ -1,37 +1,39 @@
|
||||
* [Getting Started](/)
|
||||
- [Getting Started](/)
|
||||
|
||||
* [Examples](https://github.com/dolanmiu/docx/tree/master/demo)
|
||||
- [Examples](https://github.com/dolanmiu/docx/tree/master/demo)
|
||||
|
||||
* API
|
||||
- API
|
||||
|
||||
* [Documentation](https://docx.js.org/api/)
|
||||
- [Documentation](https://docx.js.org/api/)
|
||||
|
||||
* Usage
|
||||
- Usage
|
||||
|
||||
* [Document](usage/document.md)
|
||||
* [Sections](usage/sections.md)
|
||||
* [Paragraph](usage/paragraph.md)
|
||||
* [Text](usage/text.md)
|
||||
* [Image](usage/images.md)
|
||||
* [Headers & Footers](usage/headers-and-footers.md)
|
||||
* [Bullet Points](usage/bullet-points.md)
|
||||
* [Hyperlinks](usage/hyperlinks.md)
|
||||
* [Numbering](usage/numbering.md)
|
||||
* [Tables](usage/tables.md)
|
||||
* [Tab Stops](usage/tab-stops.md)
|
||||
* [Table of Contents](usage/table-of-contents.md)
|
||||
* [Page Numbers](usage/page-numbers.md)
|
||||
* [Change Tracking](usage/change-tracking.md)
|
||||
* [Math](usage/math.md)
|
||||
* [Text Frames](usage/text-frames.md)
|
||||
* Styling
|
||||
* [Styling with JS](usage/styling-with-js.md)
|
||||
* [Styling with XML](usage/styling-with-xml.md)
|
||||
* Exporting
|
||||
- [Document](usage/document.md)
|
||||
- [Sections](usage/sections.md)
|
||||
- [Paragraph](usage/paragraph.md)
|
||||
- [Text](usage/text.md)
|
||||
- [Image](usage/images.md)
|
||||
- [Headers & Footers](usage/headers-and-footers.md)
|
||||
- [Bullet Points](usage/bullet-points.md)
|
||||
- [Hyperlinks](usage/hyperlinks.md)
|
||||
- [Numbering](usage/numbering.md)
|
||||
- [Tables](usage/tables.md)
|
||||
- [Tab Stops](usage/tab-stops.md)
|
||||
- [Table of Contents](usage/table-of-contents.md)
|
||||
- [Page Numbers](usage/page-numbers.md)
|
||||
- [Change Tracking](usage/change-tracking.md)
|
||||
- [Math](usage/math.md)
|
||||
- [Text Frames](usage/text-frames.md)
|
||||
- Styling
|
||||
_ [Styling with JS](usage/styling-with-js.md)
|
||||
_ [Styling with XML](usage/styling-with-xml.md)
|
||||
|
||||
* [Packers](usage/packers.md)
|
||||
* Utility
|
||||
- Exporting
|
||||
|
||||
* [Convenience functions](usage/convenience-functions.md)
|
||||
- [Packers](usage/packers.md)
|
||||
|
||||
* [Contribution Guidelines](contribution-guidelines.md)
|
||||
- Utility
|
||||
|
||||
- [Convenience functions](usage/convenience-functions.md)
|
||||
|
||||
- [Contribution Guidelines](contribution-guidelines.md)
|
||||
|
@ -14,9 +14,9 @@
|
||||
"webpack": "rimraf ./build && webpack --config ./webpack.config.ts",
|
||||
"demo": "npm run build && npm run ts-node --skip-project ./demo",
|
||||
"typedoc": "rimraf ./build && typedoc src/index.ts --tsconfig tsconfig.typedoc.json",
|
||||
"style": "prettier -l \"src/**/*.{ts,html,md}\"",
|
||||
"style": "prettier -l \"{src,scripts,demo}/**/*.{ts,html}\"",
|
||||
"style.fix": "npm run style -- --write",
|
||||
"cspell": "cspell \"src/**/*.ts\" && cspell \"demo/**/*.{ts,scss,html}\" && cspell \"docs/**/*.{ts,md}\" && cspell \"scripts/**/*.ts\" && cspell \"./*.*\"",
|
||||
"cspell": "cspell \"{src,demo,docs,scripts}/**/*.{ts,scss,html,md}\" && cspell \"./*.*\"",
|
||||
"fix-types": "ts-node --skip-project scripts/types-absolute-fixer.ts",
|
||||
"e2e": "ts-node scripts/e2e.ts",
|
||||
"serve.docs": "cd docs && docsify serve",
|
||||
|
Reference in New Issue
Block a user