Improve spelling and prettier commands
This commit is contained in:
@ -4,14 +4,13 @@
|
|||||||
"version": "0.2",
|
"version": "0.2",
|
||||||
// language - current active spelling language
|
// language - current active spelling language
|
||||||
"language": "en_US",
|
"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 - list of words to be always considered correct
|
||||||
"words": [
|
"words": [
|
||||||
"Xmlable",
|
"Xmlable",
|
||||||
"twip",
|
"twip",
|
||||||
"twips",
|
"twips",
|
||||||
"jsonify",
|
"jsonify",
|
||||||
"Media",
|
|
||||||
"falsey",
|
"falsey",
|
||||||
"aiueo",
|
"aiueo",
|
||||||
"iroha",
|
"iroha",
|
||||||
@ -31,7 +30,8 @@
|
|||||||
"NUMPAGES",
|
"NUMPAGES",
|
||||||
"ATLEAST",
|
"ATLEAST",
|
||||||
"ooxml",
|
"ooxml",
|
||||||
"clippy"
|
"clippy",
|
||||||
|
"docsify"
|
||||||
],
|
],
|
||||||
"ignoreRegExpList": [
|
"ignoreRegExpList": [
|
||||||
"/\"w:.+\"/",
|
"/\"w:.+\"/",
|
||||||
@ -49,7 +49,7 @@
|
|||||||
"\\.to\\.include\\.members\\(\\[[^\\]]+]\\)",
|
"\\.to\\.include\\.members\\(\\[[^\\]]+]\\)",
|
||||||
"/new [a-zA-Z]+\\({[^£]+}\\)/g"
|
"/new [a-zA-Z]+\\({[^£]+}\\)/g"
|
||||||
],
|
],
|
||||||
"ignorePaths": ["package.json"],
|
"ignorePaths": ["package.json", "docs/api"],
|
||||||
"allowCompoundWords": true,
|
"allowCompoundWords": true,
|
||||||
// flagWords - list of words to be always considered incorrect
|
// flagWords - list of words to be always considered incorrect
|
||||||
// This is useful for offensive words and common spelling errors.
|
// This is useful for offensive words and common spelling errors.
|
||||||
|
@ -52,18 +52,20 @@ const table = new Table({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const doc = new Document({
|
const doc = new Document({
|
||||||
numbering:{
|
numbering: {
|
||||||
config:[{
|
config: [
|
||||||
reference: 'ref1',
|
|
||||||
levels: [
|
|
||||||
{
|
{
|
||||||
level: 0,
|
reference: "ref1",
|
||||||
format: LevelFormat.DECIMAL,
|
levels: [
|
||||||
text: '%1)',
|
{
|
||||||
start: 50,
|
level: 0,
|
||||||
}
|
format: LevelFormat.DECIMAL,
|
||||||
],
|
text: "%1)",
|
||||||
}]
|
start: 50,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
styles: {
|
styles: {
|
||||||
default: {
|
default: {
|
||||||
@ -184,11 +186,11 @@ const doc = new Document({
|
|||||||
spacing: { line: 276, before: 20 * 72 * 0.1, after: 20 * 72 * 0.05 },
|
spacing: { line: 276, before: 20 * 72 * 0.1, after: 20 * 72 * 0.05 },
|
||||||
rightTabStop: TabStopPosition.MAX,
|
rightTabStop: TabStopPosition.MAX,
|
||||||
leftTabStop: 453.543307087,
|
leftTabStop: 453.543307087,
|
||||||
numbering : {
|
numbering: {
|
||||||
reference: 'ref1',
|
reference: "ref1",
|
||||||
instance: 0,
|
instance: 0,
|
||||||
level: 0,
|
level: 0,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -34,8 +34,7 @@ const doc = new Document({
|
|||||||
new TableCell({
|
new TableCell({
|
||||||
children: [
|
children: [
|
||||||
new Paragraph({
|
new Paragraph({
|
||||||
text:
|
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",
|
||||||
"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,
|
heading: HeadingLevel.HEADING_1,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
@ -123,8 +123,7 @@ const noBorderTable = new Table({
|
|||||||
new TableCell({
|
new TableCell({
|
||||||
children: [
|
children: [
|
||||||
new Paragraph({
|
new Paragraph({
|
||||||
text:
|
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",
|
||||||
"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,
|
heading: HeadingLevel.HEADING_1,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
@ -43,8 +43,7 @@ const doc = new Document({
|
|||||||
style: "strong",
|
style: "strong",
|
||||||
}),
|
}),
|
||||||
new TextRun({
|
new TextRun({
|
||||||
text:
|
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.",
|
||||||
" - 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",
|
author: "Firstname Lastname",
|
||||||
date: "2020-10-06T09:05:00Z",
|
date: "2020-10-06T09:05:00Z",
|
||||||
bold: false,
|
bold: false,
|
||||||
}
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
@ -4,7 +4,7 @@ import * as fs from "fs";
|
|||||||
import { Bookmark, Document, Packer, Paragraph, SimpleField, TextRun } from "../build";
|
import { Bookmark, Document, Packer, Paragraph, SimpleField, TextRun } from "../build";
|
||||||
|
|
||||||
const doc = new Document({
|
const doc = new Document({
|
||||||
creator: 'Me',
|
creator: "Me",
|
||||||
sections: [
|
sections: [
|
||||||
{
|
{
|
||||||
properties: {},
|
properties: {},
|
||||||
|
@ -13,11 +13,13 @@ const doc = new Document({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
new Paragraph({ children: [
|
new Paragraph({
|
||||||
new TextRun('This text will be in the first column.'),
|
children: [
|
||||||
new ColumnBreak(),
|
new TextRun("This text will be in the first column."),
|
||||||
new TextRun('This text will be in the second column.'),
|
new ColumnBreak(),
|
||||||
] }),
|
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)
|
- [Document](usage/document.md)
|
||||||
* [Sections](usage/sections.md)
|
- [Sections](usage/sections.md)
|
||||||
* [Paragraph](usage/paragraph.md)
|
- [Paragraph](usage/paragraph.md)
|
||||||
* [Text](usage/text.md)
|
- [Text](usage/text.md)
|
||||||
* [Image](usage/images.md)
|
- [Image](usage/images.md)
|
||||||
* [Headers & Footers](usage/headers-and-footers.md)
|
- [Headers & Footers](usage/headers-and-footers.md)
|
||||||
* [Bullet Points](usage/bullet-points.md)
|
- [Bullet Points](usage/bullet-points.md)
|
||||||
* [Hyperlinks](usage/hyperlinks.md)
|
- [Hyperlinks](usage/hyperlinks.md)
|
||||||
* [Numbering](usage/numbering.md)
|
- [Numbering](usage/numbering.md)
|
||||||
* [Tables](usage/tables.md)
|
- [Tables](usage/tables.md)
|
||||||
* [Tab Stops](usage/tab-stops.md)
|
- [Tab Stops](usage/tab-stops.md)
|
||||||
* [Table of Contents](usage/table-of-contents.md)
|
- [Table of Contents](usage/table-of-contents.md)
|
||||||
* [Page Numbers](usage/page-numbers.md)
|
- [Page Numbers](usage/page-numbers.md)
|
||||||
* [Change Tracking](usage/change-tracking.md)
|
- [Change Tracking](usage/change-tracking.md)
|
||||||
* [Math](usage/math.md)
|
- [Math](usage/math.md)
|
||||||
* [Text Frames](usage/text-frames.md)
|
- [Text Frames](usage/text-frames.md)
|
||||||
* Styling
|
- Styling
|
||||||
* [Styling with JS](usage/styling-with-js.md)
|
_ [Styling with JS](usage/styling-with-js.md)
|
||||||
* [Styling with XML](usage/styling-with-xml.md)
|
_ [Styling with XML](usage/styling-with-xml.md)
|
||||||
* Exporting
|
|
||||||
|
|
||||||
* [Packers](usage/packers.md)
|
- Exporting
|
||||||
* Utility
|
|
||||||
|
|
||||||
* [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",
|
"webpack": "rimraf ./build && webpack --config ./webpack.config.ts",
|
||||||
"demo": "npm run build && npm run ts-node --skip-project ./demo",
|
"demo": "npm run build && npm run ts-node --skip-project ./demo",
|
||||||
"typedoc": "rimraf ./build && typedoc src/index.ts --tsconfig tsconfig.typedoc.json",
|
"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",
|
"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",
|
"fix-types": "ts-node --skip-project scripts/types-absolute-fixer.ts",
|
||||||
"e2e": "ts-node scripts/e2e.ts",
|
"e2e": "ts-node scripts/e2e.ts",
|
||||||
"serve.docs": "cd docs && docsify serve",
|
"serve.docs": "cd docs && docsify serve",
|
||||||
|
Reference in New Issue
Block a user