Skip to content

Commit

Permalink
Merge pull request #120 from sCrypt-Inc/use_tsc
Browse files Browse the repository at this point in the history
Use tsc
  • Loading branch information
zhfnjust authored Jun 26, 2024
2 parents 823a76d + 8ffd09d commit d947ead
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scrypt-cli",
"version": "0.1.76",
"version": "0.1.77",
"description": "CLI tool for creating and managing sCrypt projects.",
"bin": {
"scrypt": "./src/bin/index.js",
Expand Down
12 changes: 6 additions & 6 deletions src/lib/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,21 @@ async function compile({ include, exclude, tsconfig, watch, noArtifact, asm }) {
process.exit();
});

let ts_patch_path = require.resolve("ts-patch").split(path.sep);
let ts_patch_path = require.resolve("typescript").split(path.sep);

ts_patch_path = ts_patch_path.slice(0, ts_patch_path.length - 1);
ts_patch_path = ts_patch_path.slice(0, ts_patch_path.length - 2);
ts_patch_path.push("bin")
ts_patch_path.push("tspc")
ts_patch_path.push("tsc")

const tspc = ts_patch_path.join(path.sep)
const tsc = ts_patch_path.join(path.sep)

// Run tsc which in turn also transpiles to sCrypt
if (watch) {
await shExec(`node "${tspc}" --watch --p "${tsconfigScryptTSPath}"`)
await shExec(`node "${tsc}" --watch --p "${tsconfigScryptTSPath}"`)
} else {
const result = await stepCmd(
'Building TS',
`node "${tspc}" --p "${tsconfigScryptTSPath}"`, false);
`node "${tsc}" --p "${tsconfigScryptTSPath}"`, false);

if (result instanceof Error) {
console.log(red(`ERROR: Building TS failed!`));
Expand Down

0 comments on commit d947ead

Please sign in to comment.