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