Improve import alias
@file/ and @export/ instead of file/ and export/ etc
This commit is contained in:
@ -2,7 +2,7 @@ import { expect } from "chai";
|
||||
|
||||
import { DocumentDefaults } from "./document-defaults";
|
||||
|
||||
import { Formatter } from "export/formatter";
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
describe("DocumentDefaults", () => {
|
||||
it("#constructor", () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { IParagraphStylePropertiesOptions } from "file/paragraph/properties";
|
||||
import { IRunStylePropertiesOptions } from "file/paragraph/run/properties";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { IParagraphStylePropertiesOptions } from "@file/paragraph/properties";
|
||||
import { IRunStylePropertiesOptions } from "@file/paragraph/run/properties";
|
||||
import { XmlComponent } from "@file/xml-components";
|
||||
import { ParagraphPropertiesDefaults } from "./paragraph-properties";
|
||||
import { RunPropertiesDefaults } from "./run-properties";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IParagraphStylePropertiesOptions, ParagraphProperties } from "file/paragraph/properties";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { IParagraphStylePropertiesOptions, ParagraphProperties } from "@file/paragraph/properties";
|
||||
import { XmlComponent } from "@file/xml-components";
|
||||
|
||||
export class ParagraphPropertiesDefaults extends XmlComponent {
|
||||
constructor(options?: IParagraphStylePropertiesOptions) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IRunStylePropertiesOptions, RunProperties } from "file/paragraph/run/properties";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { IRunStylePropertiesOptions, RunProperties } from "@file/paragraph/run/properties";
|
||||
import { XmlComponent } from "@file/xml-components";
|
||||
|
||||
export class RunPropertiesDefaults extends XmlComponent {
|
||||
constructor(options?: IRunStylePropertiesOptions) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { convertToXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent } from "file/xml-components";
|
||||
import { convertToXmlComponent, ImportedRootElementAttributes, ImportedXmlComponent } from "@file/xml-components";
|
||||
import { Element as XMLElement, xml2js } from "xml-js";
|
||||
import { Styles } from "./";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { Formatter } from "export/formatter";
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
import { LatentStyleException } from "./exceptions";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
|
||||
|
||||
export interface ILatentStyleExceptionAttributesProperties {
|
||||
readonly name?: string;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { Formatter } from "export/formatter";
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
import { LatentStyleException } from "./exceptions";
|
||||
import { LatentStyles } from "./latent-styles";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { XmlComponent } from "@file/xml-components";
|
||||
import { LatentStyleException } from "./exceptions";
|
||||
|
||||
export class LatentStyles extends XmlComponent {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { Formatter } from "export/formatter";
|
||||
import { EmphasisMarkType } from "file/paragraph/run/emphasis-mark";
|
||||
import { UnderlineType } from "file/paragraph/run/underline";
|
||||
import { ShadingType } from "file/shading";
|
||||
import { EMPTY_OBJECT } from "file/xml-components";
|
||||
import { Formatter } from "@export/formatter";
|
||||
import { EmphasisMarkType } from "@file/paragraph/run/emphasis-mark";
|
||||
import { UnderlineType } from "@file/paragraph/run/underline";
|
||||
import { ShadingType } from "@file/shading";
|
||||
import { EMPTY_OBJECT } from "@file/xml-components";
|
||||
|
||||
import { StyleForCharacter } from "./character-style";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IRunStylePropertiesOptions, RunProperties } from "file/paragraph/run/properties";
|
||||
import { IRunStylePropertiesOptions, RunProperties } from "@file/paragraph/run/properties";
|
||||
|
||||
import { IStyleOptions, Style } from "./style";
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { expect } from "chai";
|
||||
import { Formatter } from "export/formatter";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
import * as components from "./components";
|
||||
|
||||
describe("Style components", () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// http://officeopenxml.com/WPstyleGenProps.php
|
||||
import { decimalNumber } from "file/values";
|
||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
|
||||
import { decimalNumber } from "@util/values";
|
||||
|
||||
class ComponentAttributes extends XmlAttributeComponent<{
|
||||
readonly val: string | number;
|
||||
|
@ -1,8 +1,10 @@
|
||||
import { expect } from "chai";
|
||||
import { Formatter } from "export/formatter";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
import * as defaultStyles from "./default-styles";
|
||||
|
||||
import { EMPTY_OBJECT } from "file/xml-components";
|
||||
import { EMPTY_OBJECT } from "@file/xml-components";
|
||||
|
||||
describe("Default Styles", () => {
|
||||
it("HeadingStyle#constructor", () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { UnderlineType } from "file/paragraph/run/underline";
|
||||
import { UnderlineType } from "@file/paragraph/run/underline";
|
||||
|
||||
import { LineRuleType } from "file/paragraph";
|
||||
import { LineRuleType } from "@file/paragraph";
|
||||
|
||||
import { IBaseCharacterStyleOptions, StyleForCharacter } from "./character-style";
|
||||
import { IBaseParagraphStyleOptions, IParagraphStyleOptions, StyleForParagraph } from "./paragraph-style";
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { Formatter } from "export/formatter";
|
||||
import { AlignmentType, EmphasisMarkType, TabStopPosition } from "file/paragraph";
|
||||
import { UnderlineType } from "file/paragraph/run/underline";
|
||||
import { ShadingType } from "file/shading";
|
||||
import { EMPTY_OBJECT } from "file/xml-components";
|
||||
import { Formatter } from "@export/formatter";
|
||||
import { AlignmentType, EmphasisMarkType, TabStopPosition } from "@file/paragraph";
|
||||
import { UnderlineType } from "@file/paragraph/run/underline";
|
||||
import { ShadingType } from "@file/shading";
|
||||
import { EMPTY_OBJECT } from "@file/xml-components";
|
||||
|
||||
import { StyleForParagraph } from "./paragraph-style";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IParagraphStylePropertiesOptions, IRunStylePropertiesOptions, ParagraphProperties } from "file/paragraph";
|
||||
import { RunProperties } from "file/paragraph/run/properties";
|
||||
import { IParagraphStylePropertiesOptions, IRunStylePropertiesOptions, ParagraphProperties } from "@file/paragraph";
|
||||
import { RunProperties } from "@file/paragraph/run/properties";
|
||||
import { IStyleOptions, Style } from "./style";
|
||||
|
||||
export interface IBaseParagraphStyleOptions extends IStyleOptions {
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { expect } from "chai";
|
||||
import { Formatter } from "export/formatter";
|
||||
|
||||
import { Formatter } from "@export/formatter";
|
||||
|
||||
import { Style } from "./style";
|
||||
|
||||
describe("Style", () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { OnOffElement, StringValueElement, XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
import { OnOffElement, StringValueElement, XmlAttributeComponent, XmlComponent } from "@file/xml-components";
|
||||
import { Name, UiPriority } from "./components";
|
||||
|
||||
// <xsd:complexType name="CT_Style">
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { expect } from "chai";
|
||||
|
||||
import { Formatter } from "export/formatter";
|
||||
import { EMPTY_OBJECT } from "file/xml-components";
|
||||
import { Formatter } from "@export/formatter";
|
||||
import { EMPTY_OBJECT } from "@file/xml-components";
|
||||
|
||||
import { Styles } from "./styles";
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IDefaultStylesOptions } from "file/styles/factory";
|
||||
import { BaseXmlComponent, ImportedXmlComponent, XmlComponent } from "file/xml-components";
|
||||
import { IDefaultStylesOptions } from "@file/styles/factory";
|
||||
import { BaseXmlComponent, ImportedXmlComponent, XmlComponent } from "@file/xml-components";
|
||||
import { StyleForCharacter, StyleForParagraph } from "./style";
|
||||
import { ICharacterStyleOptions } from "./style/character-style";
|
||||
import { IParagraphStyleOptions } from "./style/paragraph-style";
|
||||
|
Reference in New Issue
Block a user