raw-ts is a lightweight tool that convert a file to a raw typscript string.
unraw-ts is the opposite tool that convert a raw typscript string to a file. (only raw-ts is documented since usage is the same)
Download the latest release from the release page.
Put the executable in your path.
Run the following command:
raw-ts <file>
Content of example/wait.ts
:
export const wait = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
raw-ts example/wait.ts
Output (content of example/waitRaw.ts
):
export default "export const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));\r\n";
You can then import the file in your project (content of example/print.ts
):
import waitRaw from "./waitRaw";
console.log(waitRaw);
bun install
bun run dev <file>
bun run build
MIT Licence. See LICENSE file. Please refer me with:
Copyright (c) Nicolas VENTER All rights reserved.