-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into 'origin/feat/inli…
…ne-external-types'
- Loading branch information
Showing
18 changed files
with
299 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { deepkitType } from './src/plugin.js'; | ||
import { readFileSync } from 'fs'; | ||
|
||
interface Arguments { | ||
file: string; | ||
config?: string; | ||
} | ||
|
||
function parseArguments(args: string[]): Arguments { | ||
const result: Arguments = { | ||
file: '', | ||
}; | ||
|
||
for (let i = 0; i < args.length; i++) { | ||
const arg = args[i]; | ||
if (arg === '--config') { | ||
result.config = args[i + 1]; | ||
i++; | ||
} else { | ||
result.file = arg; | ||
} | ||
} | ||
|
||
return result; | ||
} | ||
|
||
const args = parseArguments(process.argv.slice(2)); | ||
|
||
|
||
|
||
const transformer = deepkitType({ | ||
tsConfig: args.config, | ||
}); | ||
|
||
const code = readFileSync(args.file, 'utf8'); | ||
const transformed = transformer(code, args.file); | ||
|
||
console.log(transformed?.code); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env node | ||
|
||
try { | ||
require('./dist/cjs/compiler-debug.js'); | ||
} catch (error) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.