Add back types absolute fixer
This commit is contained in:
@ -10,7 +10,7 @@
|
|||||||
"test.watch": "npm test -- --watch",
|
"test.watch": "npm test -- --watch",
|
||||||
"prepublishOnly": "npm run build --production",
|
"prepublishOnly": "npm run build --production",
|
||||||
"lint": "tslint --project .",
|
"lint": "tslint --project .",
|
||||||
"build": "npm run webpack",
|
"build": "npm run webpack && npm run fix-types",
|
||||||
"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",
|
||||||
|
@ -1,18 +1,16 @@
|
|||||||
import * as glob from "glob";
|
import * as glob from "glob";
|
||||||
import * as replace from "replace-in-file";
|
import { replaceInFile } from "replace-in-file";
|
||||||
|
|
||||||
const files = glob.sync("build/**/*.d.ts");
|
const files = glob.sync("build/**/*.d.ts");
|
||||||
|
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
replace({
|
replaceInFile({
|
||||||
files: file,
|
files: file,
|
||||||
from: /"file[a-z/-]*"/gi,
|
from: /"file[a-z/-]*"/gi,
|
||||||
to: (match) => {
|
to: (match) => {
|
||||||
const matchSlug = match.replace(/['"]+/g, "").trim();
|
const matchSlug = match.replace(/['"]+/g, "").trim();
|
||||||
const levelCount = file.split("/").length - 2;
|
const levelCount = file.split("/").length - 2;
|
||||||
const backLevels = Array(levelCount)
|
const backLevels = Array(levelCount).fill("../").join("");
|
||||||
.fill("../")
|
|
||||||
.join("");
|
|
||||||
|
|
||||||
return `"${backLevels}${matchSlug}"`;
|
return `"${backLevels}${matchSlug}"`;
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// http://officeopenxml.com/WPparagraph-textFrames.php
|
// http://officeopenxml.com/WPparagraph-textFrames.php
|
||||||
|
import { HeightRule } from "file";
|
||||||
import { HorizontalPositionAlign, VerticalPositionAlign } from "file/shared/alignment";
|
import { HorizontalPositionAlign, VerticalPositionAlign } from "file/shared/alignment";
|
||||||
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||||
import { HeightRule } from "/file";
|
|
||||||
|
|
||||||
export enum DropCapType {
|
export enum DropCapType {
|
||||||
NONE = "none",
|
NONE = "none",
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"baseUrl": "./src",
|
"baseUrl": "./src",
|
||||||
"paths": {
|
"paths": {
|
||||||
"/*": ["./*"],
|
|
||||||
"convenience-functions": ["./convenience-functions"],
|
"convenience-functions": ["./convenience-functions"],
|
||||||
"@export/*": ["./export/*"]
|
"@export/*": ["./export/*"],
|
||||||
|
"file/*": ["./file/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["src"]
|
"include": ["src"]
|
||||||
|
Reference in New Issue
Block a user