-
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const cp = require("child_process"); | ||
const fs = require("fs"); | ||
const supress = require("suppress-warnings"); | ||
|
||
const setup = () => { | ||
const version = (() => { | ||
cp.execSync("npm pack", { cwd: `${__dirname}/..` }); | ||
const pack = JSON.parse( | ||
fs.readFileSync(`${__dirname}/../package.json`, "utf8"), | ||
); | ||
return pack.version; | ||
})(); | ||
const mine = JSON.parse(fs.readFileSync(`${__dirname}/package.json`, "utf8")); | ||
|
||
if (fs.existsSync(`${__dirname}/node_modules/typia`)) | ||
cp.execSync("npm uninstall typia", { | ||
cwd: __dirname, | ||
stdio: "ignore", | ||
}); | ||
mine.dependencies.typia = `../typia-${version}.tgz`; | ||
fs.writeFileSync(`${__dirname}/package.json`, JSON.stringify(mine, null, 2)); | ||
cp.execSync("npm install", { cwd: __dirname, stdio: "ignore" }); | ||
}; | ||
|
||
const execute = () => { | ||
cp.execSync("npx rimraf bin && npx tsc", { | ||
cwd: __dirname, | ||
stdio: "inherit", | ||
}); | ||
}; | ||
|
||
supress([() => true]); | ||
setup(); | ||
execute(); |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import typia from "typia"; | ||
|
||
interface Foo { | ||
paths?: { | ||
[from: string]: [string]; | ||
}; | ||
} | ||
|
||
console.log(typia.createAssert<Foo>().toString()); |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.