Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelsboost/typescript-compile
Automatically compile TypeScript to JavaScript on the fly
https://github.com/michaelsboost/typescript-compile
compile compiler javascript typescript
Last synced: 19 days ago
JSON representation
Automatically compile TypeScript to JavaScript on the fly
- Host: GitHub
- URL: https://github.com/michaelsboost/typescript-compile
- Owner: michaelsboost
- License: mit
- Created: 2024-08-10T01:19:05.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-10T01:26:06.000Z (6 months ago)
- Last Synced: 2025-01-13T07:17:05.801Z (24 days ago)
- Topics: compile, compiler, javascript, typescript
- Language: JavaScript
- Homepage: https://michaelsboost.github.io/typescript-compile/demo/demo.html
- Size: 747 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
TypeScript Compile
==================[TypeScript](http://www.typescriptlang.org) is a brand new language which compiles on JavaScript. However, this operation has to be performed manually, using the command-line compiler `tsc` or other tools. But now it has drastically improved, thanks to TypeScript Compile! TypeScript Compile automatically transforms your TypeScript code into JavaScript on the fly! Just write your TS code between:
...
or include your TS file:
and add these two JS files **at the end of the HTML body**:
That's it! TypeScript will be compiled to JavaScript and immediately run, by appending the compiled script to the HTML body. You can see any compilation errors in the web console.
How It Works!
----TypeScript Compile works by grabbing the typescript source from within the text/typescript tags (or via fetching the file(s)) and compiling it via TypeScript and then appending a new script of the compiled Javascript. By doing it this way Typescript Compile contains only 40 lines of Javascript and is only 4KB in size.
Inspired by the original [TypeScript Compile](https://github.com/niutech/typescript-compile) by Jerzy Głowacki.
Demo
----[Here is a live demo](http://michaelsboost.github.io/typescript-compile/demo/demo.html)
Download
--------[TypeScript 5.5](https://raw.github.com/michaelsboost/typescript-compile/main/js/typescript.min.js) (minified JS)
[TypeScript Compile 1.0.0](https://raw.github.com/michaelsboost/typescript-compile/main/js/typescript.compile.min.js) (minified JS)License
-------------MIT