Improve import alias

@file/ and @export/ instead of file/ and export/ etc
This commit is contained in:
Dolan Miu
2022-06-26 23:26:42 +01:00
parent c19bc6b4b3
commit 982d923553
380 changed files with 758 additions and 521 deletions

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { Break } from "./break";

View File

@ -1,5 +1,5 @@
// http://officeopenxml.com/WPtextSpecialContent-break.php
import { XmlComponent } from "file/xml-components";
import { XmlComponent } from "@file/xml-components";
// <xsd:group name="EG_RunInnerContent">
// ...

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments } from "./comment-run";
describe("CommentRangeStart", () => {

View File

@ -1,5 +1,5 @@
import { Paragraph } from "file/paragraph";
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { Paragraph } from "@file/paragraph";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { TextRun } from "./text-run";

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import * as em from "./emphasis-mark";

View File

@ -1,4 +1,4 @@
import { Attributes, XmlComponent } from "file/xml-components";
import { Attributes, XmlComponent } from "@file/xml-components";
export enum EmphasisMarkType {
DOT = "dot",

View File

@ -1,4 +1,4 @@
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
enum FieldCharacterType {
BEGIN = "begin",

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { CharacterSpacing, Color } from "./formatting";

View File

@ -1,5 +1,5 @@
import { hexColorValue, signedTwipsMeasureValue } from "file/values";
import { Attributes, XmlComponent } from "file/xml-components";
import { Attributes, XmlComponent } from "@file/xml-components";
import { hexColorValue, signedTwipsMeasureValue } from "@util/values";
export class CharacterSpacing extends XmlComponent {
constructor(value: number | string) {

View File

@ -1,10 +1,10 @@
import { expect } from "chai";
import { SinonStub, stub } from "sinon";
import * as convenienceFunctions from "convenience-functions";
import { Formatter } from "export/formatter";
import { IViewWrapper } from "file/document-wrapper";
import { File } from "file/file";
import { Formatter } from "@export/formatter";
import { IViewWrapper } from "@file/document-wrapper";
import { File } from "@file/file";
import * as convenienceFunctions from "@util/convenience-functions";
import { ImageRun } from "./image-run";

View File

@ -1,6 +1,6 @@
import { uniqueId } from "convenience-functions";
import { uniqueId } from "@util/convenience-functions";
import { IContext, IXmlableObject } from "file/xml-components";
import { IContext, IXmlableObject } from "@file/xml-components";
import { Drawing, IFloating } from "../../drawing";
import { IMediaTransformation } from "../../media";

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { NumberOfPages, NumberOfPagesSection, Page } from "./page-number";

View File

@ -1,5 +1,5 @@
import { SpaceType } from "file/space-type";
import { XmlComponent } from "file/xml-components";
import { SpaceType } from "@file/space-type";
import { XmlComponent } from "@file/xml-components";
import { TextAttributes } from "./text-attributes";

View File

@ -1,8 +1,8 @@
import { BorderElement, IBorderOptions } from "file/border";
import { IShadingAttributesProperties, Shading } from "file/shading";
import { SpaceType } from "file/space-type";
import { ChangeAttributes, IChangedAttributesProperties } from "file/track-revision/track-revision";
import { HpsMeasureElement, IgnoreIfEmptyXmlComponent, OnOffElement, StringValueElement, XmlComponent } from "file/xml-components";
import { BorderElement, IBorderOptions } from "@file/border";
import { IShadingAttributesProperties, Shading } from "@file/shading";
import { SpaceType } from "@file/space-type";
import { ChangeAttributes, IChangedAttributesProperties } from "@file/track-revision/track-revision";
import { HpsMeasureElement, IgnoreIfEmptyXmlComponent, OnOffElement, StringValueElement, XmlComponent } from "@file/xml-components";
import { EmphasisMark, EmphasisMarkType } from "./emphasis-mark";
import { CharacterSpacing, Color, Highlight, HighlightComplexScript } from "./formatting";

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { Symbol } from "./symbol";

View File

@ -1,4 +1,4 @@
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
class SymbolAttributes extends XmlAttributeComponent<{
readonly char: string;

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { Text } from "./text";

View File

@ -1,5 +1,5 @@
import { SpaceType } from "file/space-type";
import { XmlComponent } from "file/xml-components";
import { SpaceType } from "@file/space-type";
import { XmlComponent } from "@file/xml-components";
import { TextAttributes } from "../text-attributes";

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { RunFonts } from "./run-fonts";

View File

@ -1,4 +1,4 @@
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
export interface IFontAttributesProperties {
readonly ascii?: string;

View File

@ -1,10 +1,10 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { BorderStyle } from "file/border";
// import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run";
import { ShadingType } from "file/shading";
import { SpaceType } from "file/space-type";
import { Formatter } from "@export/formatter";
import { BorderStyle } from "@file/border";
// import { FootnoteReferenceRun } from "@file/footnotes/footnote/run/reference-run";
import { ShadingType } from "@file/shading";
import { SpaceType } from "@file/space-type";
import { Run } from "./";
import { EmphasisMarkType } from "./emphasis-mark";

View File

@ -1,8 +1,8 @@
// http://officeopenxml.com/WPtext.php
import { XmlComponent } from "file/xml-components";
import { XmlComponent } from "@file/xml-components";
import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run";
import { FieldInstruction } from "file/table-of-contents/field-instruction";
import { FootnoteReferenceRun } from "@file/footnotes/footnote/run/reference-run";
import { FieldInstruction } from "@file/table-of-contents/field-instruction";
import { Break } from "./break";
import { Begin, End, Separate } from "./field";

View File

@ -1,4 +1,4 @@
import { Attributes, XmlComponent } from "file/xml-components";
import { Attributes, XmlComponent } from "@file/xml-components";
export abstract class VerticalAlign extends XmlComponent {
constructor(type: string) {

View File

@ -1,6 +1,6 @@
// http://officeopenxml.com/WPfieldInstructions.php
import { SpaceType } from "file/space-type";
import { XmlComponent } from "file/xml-components";
import { SpaceType } from "@file/space-type";
import { XmlComponent } from "@file/xml-components";
import { TextAttributes } from "./text-attributes";

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { SequentialIdentifier } from "./sequential-identifier";

View File

@ -1,5 +1,5 @@
import { Run } from "file/paragraph/run";
import { Begin, End, Separate } from "file/paragraph/run/field";
import { Run } from "@file/paragraph/run";
import { Begin, End, Separate } from "@file/paragraph/run/field";
import { SequentialIdentifierInstruction } from "./sequential-identifier-instruction";
export class SequentialIdentifier extends Run {

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { SimpleField, SimpleMailMergeField } from "./simple-field";

View File

@ -1,5 +1,5 @@
// http://www.datypic.com/sc/ooxml/e-w_fldSimple-1.html
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
import { TextRun } from "./text-run";
class FldSimpleAttrs extends XmlAttributeComponent<{ readonly instr: string }> {

View File

@ -2,7 +2,7 @@ import { expect } from "chai";
import { EmphasisMarkType } from "./emphasis-mark";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { UnderlineType } from "./underline";

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { Tab } from "./tab";

View File

@ -1,4 +1,4 @@
import { XmlComponent } from "file/xml-components";
import { XmlComponent } from "@file/xml-components";
// <xsd:group name="EG_RunInnerContent">
// ...

View File

@ -1,5 +1,5 @@
import { SpaceType } from "file/space-type";
import { XmlAttributeComponent } from "file/xml-components";
import { SpaceType } from "@file/space-type";
import { XmlAttributeComponent } from "@file/xml-components";
export class TextAttributes extends XmlAttributeComponent<{ readonly space: SpaceType }> {
protected readonly xmlKeys = { space: "xml:space" };

View File

@ -1,7 +1,7 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { FootnoteReferenceRun } from "file/footnotes/footnote/run/reference-run";
import { Formatter } from "@export/formatter";
import { FootnoteReferenceRun } from "@file/footnotes/footnote/run/reference-run";
import { TextRun } from "./text-run";

View File

@ -1,6 +1,6 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { Formatter } from "@export/formatter";
import { Underline, UnderlineType } from "./underline";

View File

@ -1,5 +1,5 @@
import { hexColorValue } from "file/values";
import { Attributes, XmlComponent } from "file/xml-components";
import { Attributes, XmlComponent } from "@file/xml-components";
import { hexColorValue } from "@util/values";
export enum UnderlineType {
SINGLE = "single",