typenative 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,9 +4,9 @@ Build native applications using Typescript.
4
4
 
5
5
  ## Get Started
6
6
 
7
- - Write a file `test.ts` with content `console.log('Hello World!'); getchar()` or any other message.
7
+ - Write a file `test.ts` with content `console.log('Hello World!');` or any other message
8
8
  - Run `npx typenative --source test.ts`
9
- - Run the executable in `dist/native.exe` and see your message
9
+ - Run `dist/native.exe` in terminal and see your message
10
10
 
11
11
  ## Todo
12
12
 
package/bin/transpiler.js CHANGED
@@ -1,13 +1,9 @@
1
1
  import ts from 'typescript';
2
2
  export function transpileToC(code) {
3
3
  const sourceFile = ts.createSourceFile('main.ts', code, ts.ScriptTarget.ES2020, true, ts.ScriptKind.TS);
4
- return `
5
- #define console.log(message) printf(message)
6
-
7
- #include <stdio.h>
4
+ return `#include <stdio.h>
8
5
  #include <string.h>
9
6
 
10
-
11
7
  int main() {
12
8
  ${visit(sourceFile)}
13
9
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typenative",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Build native applications using Typescript.",
5
5
  "type": "module",
6
6
  "bin": {