typenative 0.0.6 → 0.0.7
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/bin/index.js +4 -1
- package/package.json +1 -1
- /package/{tcc → bin/tcc}/doc/tcc-doc.html +0 -0
- /package/{tcc → bin/tcc}/doc/tcc-win32.txt +0 -0
- /package/{tcc → bin/tcc}/examples/dll.c +0 -0
- /package/{tcc → bin/tcc}/examples/fib.c +0 -0
- /package/{tcc → bin/tcc}/examples/hello_dll.c +0 -0
- /package/{tcc → bin/tcc}/examples/hello_win.c +0 -0
- /package/{tcc → bin/tcc}/examples/libtcc_test.c +0 -0
- /package/{tcc → bin/tcc}/include/_mingw.h +0 -0
- /package/{tcc → bin/tcc}/include/assert.h +0 -0
- /package/{tcc → bin/tcc}/include/conio.h +0 -0
- /package/{tcc → bin/tcc}/include/ctype.h +0 -0
- /package/{tcc → bin/tcc}/include/dir.h +0 -0
- /package/{tcc → bin/tcc}/include/direct.h +0 -0
- /package/{tcc → bin/tcc}/include/dirent.h +0 -0
- /package/{tcc → bin/tcc}/include/dos.h +0 -0
- /package/{tcc → bin/tcc}/include/errno.h +0 -0
- /package/{tcc → bin/tcc}/include/excpt.h +0 -0
- /package/{tcc → bin/tcc}/include/fcntl.h +0 -0
- /package/{tcc → bin/tcc}/include/fenv.h +0 -0
- /package/{tcc → bin/tcc}/include/float.h +0 -0
- /package/{tcc → bin/tcc}/include/inttypes.h +0 -0
- /package/{tcc → bin/tcc}/include/io.h +0 -0
- /package/{tcc → bin/tcc}/include/limits.h +0 -0
- /package/{tcc → bin/tcc}/include/locale.h +0 -0
- /package/{tcc → bin/tcc}/include/malloc.h +0 -0
- /package/{tcc → bin/tcc}/include/math.h +0 -0
- /package/{tcc → bin/tcc}/include/mem.h +0 -0
- /package/{tcc → bin/tcc}/include/memory.h +0 -0
- /package/{tcc → bin/tcc}/include/process.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/conio_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/crtdbg_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/io_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/mbstring_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/search_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/stdio_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/stdlib_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/stralign_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/string_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/sys/timeb_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/tchar_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/time_s.h +0 -0
- /package/{tcc → bin/tcc}/include/sec_api/wchar_s.h +0 -0
- /package/{tcc → bin/tcc}/include/setjmp.h +0 -0
- /package/{tcc → bin/tcc}/include/share.h +0 -0
- /package/{tcc → bin/tcc}/include/signal.h +0 -0
- /package/{tcc → bin/tcc}/include/stdarg.h +0 -0
- /package/{tcc → bin/tcc}/include/stdbool.h +0 -0
- /package/{tcc → bin/tcc}/include/stddef.h +0 -0
- /package/{tcc → bin/tcc}/include/stdint.h +0 -0
- /package/{tcc → bin/tcc}/include/stdio.h +0 -0
- /package/{tcc → bin/tcc}/include/stdlib.h +0 -0
- /package/{tcc → bin/tcc}/include/string.h +0 -0
- /package/{tcc → bin/tcc}/include/sys/fcntl.h +0 -0
- /package/{tcc → bin/tcc}/include/sys/file.h +0 -0
- /package/{tcc → bin/tcc}/include/sys/locking.h +0 -0
- /package/{tcc → bin/tcc}/include/sys/stat.h +0 -0
- /package/{tcc → bin/tcc}/include/sys/time.h +0 -0
- /package/{tcc → bin/tcc}/include/sys/timeb.h +0 -0
- /package/{tcc → bin/tcc}/include/sys/types.h +0 -0
- /package/{tcc → bin/tcc}/include/sys/unistd.h +0 -0
- /package/{tcc → bin/tcc}/include/sys/utime.h +0 -0
- /package/{tcc → bin/tcc}/include/tcclib.h +0 -0
- /package/{tcc → bin/tcc}/include/tchar.h +0 -0
- /package/{tcc → bin/tcc}/include/time.h +0 -0
- /package/{tcc → bin/tcc}/include/vadefs.h +0 -0
- /package/{tcc → bin/tcc}/include/values.h +0 -0
- /package/{tcc → bin/tcc}/include/varargs.h +0 -0
- /package/{tcc → bin/tcc}/include/wchar.h +0 -0
- /package/{tcc → bin/tcc}/include/wctype.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/basetsd.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/basetyps.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/guiddef.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/intrin.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/poppack.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/pshpack1.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/pshpack2.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/pshpack4.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/pshpack8.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/reason.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/specstrings.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/stralign.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/tvout.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/winbase.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/wincon.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/windef.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/windows.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/winerror.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/wingdi.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/winnetwk.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/winnls.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/winnt.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/winreg.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/winuser.h +0 -0
- /package/{tcc → bin/tcc}/include/winapi/winver.h +0 -0
- /package/{tcc → bin/tcc}/lib/gdi32.def +0 -0
- /package/{tcc → bin/tcc}/lib/kernel32.def +0 -0
- /package/{tcc → bin/tcc}/lib/libtcc1.a +0 -0
- /package/{tcc → bin/tcc}/lib/msvcrt.def +0 -0
- /package/{tcc → bin/tcc}/lib/user32.def +0 -0
- /package/{tcc → bin/tcc}/libtcc/libtcc.def +0 -0
- /package/{tcc → bin/tcc}/libtcc/libtcc.h +0 -0
- /package/{tcc → bin/tcc}/libtcc.dll +0 -0
- /package/{tcc → bin/tcc}/tcc.exe +0 -0
- /package/{tcc → bin/tcc}/tiny_impdef.exe +0 -0
- /package/{tcc → bin/tcc}/tiny_libmaker.exe +0 -0
package/bin/index.js
CHANGED
|
@@ -4,6 +4,9 @@ import shell from 'shelljs';
|
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import { transpileToC } from './transpiler.js';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = path.dirname(__filename);
|
|
7
10
|
(async function main() {
|
|
8
11
|
const scriptMode = process.argv.findIndex((a) => a === '--script') > -1;
|
|
9
12
|
const targetIndex = process.argv.findIndex((a) => a === '--source');
|
|
@@ -34,7 +37,7 @@ import { transpileToC } from './transpiler.js';
|
|
|
34
37
|
const cCode = transpileToC(tsCode);
|
|
35
38
|
await fs.ensureDir('dist');
|
|
36
39
|
await fs.writeFile('dist/code.c', cCode, { encoding: 'utf-8' });
|
|
37
|
-
shell.exec(`${__dirname
|
|
40
|
+
shell.exec(`${__dirname}/tcc/tcc.exe -g ${path.resolve()}/dist/code.c -o ${path.resolve()}/dist/native.exe ${scriptMode ? '-run' : ''}`);
|
|
38
41
|
if (answers.output) {
|
|
39
42
|
await fs.copy('dist/native.exe', answers.output, { overwrite: true });
|
|
40
43
|
}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{tcc → bin/tcc}/tcc.exe
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|