mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Fix formating
This commit is contained in:
parent
9ef5a235d2
commit
29892cf6ba
2 changed files with 22 additions and 11 deletions
|
|
@ -3,7 +3,7 @@ import { join as pathJoin, relative as pathRelative } from "path";
|
||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
|
|
||||||
const singletonDependencies: string[] = [
|
const singletonDependencies: string[] = [
|
||||||
//"react",
|
//"react",
|
||||||
//"@types/react"
|
//"@types/react"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -15,7 +15,9 @@ fs.writeFileSync(
|
||||||
Buffer.from(
|
Buffer.from(
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
(() => {
|
(() => {
|
||||||
const packageJsonParsed = JSON.parse(fs.readFileSync(pathJoin(rootDirPath, "package.json")).toString("utf8"));
|
const packageJsonParsed = JSON.parse(
|
||||||
|
fs.readFileSync(pathJoin(rootDirPath, "package.json")).toString("utf8")
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...packageJsonParsed,
|
...packageJsonParsed,
|
||||||
|
|
@ -73,7 +75,11 @@ fs.mkdirSync(yarnGlobalDirPath);
|
||||||
const execYarnLink = (params: { targetModuleName?: string; cwd: string }) => {
|
const execYarnLink = (params: { targetModuleName?: string; cwd: string }) => {
|
||||||
const { targetModuleName, cwd } = params;
|
const { targetModuleName, cwd } = params;
|
||||||
|
|
||||||
const cmd = ["yarn", "link", ...(targetModuleName !== undefined ? [targetModuleName] : ["--no-bin-links"])].join(" ");
|
const cmd = [
|
||||||
|
"yarn",
|
||||||
|
"link",
|
||||||
|
...(targetModuleName !== undefined ? [targetModuleName] : ["--no-bin-links"])
|
||||||
|
].join(" ");
|
||||||
|
|
||||||
console.log(`$ cd ${pathRelative(rootDirPath, cwd) || "."} && ${cmd}`);
|
console.log(`$ cd ${pathRelative(rootDirPath, cwd) || "."} && ${cmd}`);
|
||||||
|
|
||||||
|
|
@ -122,7 +128,13 @@ commonThirdPartyDeps.forEach(commonThirdPartyDep => {
|
||||||
console.log(`${current}/${total} ${commonThirdPartyDep}`);
|
console.log(`${current}/${total} ${commonThirdPartyDep}`);
|
||||||
|
|
||||||
const localInstallPath = pathJoin(
|
const localInstallPath = pathJoin(
|
||||||
...[rootDirPath, "node_modules", ...(commonThirdPartyDep.startsWith("@") ? commonThirdPartyDep.split("/") : [commonThirdPartyDep])]
|
...[
|
||||||
|
rootDirPath,
|
||||||
|
"node_modules",
|
||||||
|
...(commonThirdPartyDep.startsWith("@")
|
||||||
|
? commonThirdPartyDep.split("/")
|
||||||
|
: [commonThirdPartyDep])
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
execYarnLink({ "cwd": localInstallPath });
|
execYarnLink({ "cwd": localInstallPath });
|
||||||
|
|
@ -144,7 +156,9 @@ execYarnLink({ "cwd": pathJoin(rootDirPath, "dist") });
|
||||||
testAppPaths.forEach(testAppPath =>
|
testAppPaths.forEach(testAppPath =>
|
||||||
execYarnLink({
|
execYarnLink({
|
||||||
"cwd": testAppPath,
|
"cwd": testAppPath,
|
||||||
"targetModuleName": JSON.parse(fs.readFileSync(pathJoin(rootDirPath, "package.json")).toString("utf8"))["name"]
|
"targetModuleName": JSON.parse(
|
||||||
|
fs.readFileSync(pathJoin(rootDirPath, "package.json")).toString("utf8")
|
||||||
|
)["name"]
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"module": "CommonJS",
|
"module": "CommonJS",
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"lib": ["es2015","DOM","ES2019.Object"],
|
"lib": ["es2015", "DOM", "ES2019.Object"],
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
// Do not change or the linking script will stop working
|
// Do not change or the linking script will stop working
|
||||||
|
|
@ -19,8 +19,5 @@
|
||||||
"noFallthroughCasesInSwitch": true
|
"noFallthroughCasesInSwitch": true
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": [
|
"exclude": ["src/**/*.deno.ts", "src/**/*.deno.tsx"]
|
||||||
"src/**/*.deno.ts",
|
}
|
||||||
"src/**/*.deno.tsx"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue