Huan(20200317): This modules is deprecated because it's not necessary anymore.
Pure Typescript Loader for running typescript death easy as javascript
Please come back later if you are interesting Pupre-Typescript project.
- TypeScript be treated as First Class Language
- Support Pure TypeScript modules/library in node_moduels(done by #1
- Zero Configuration in Server(in progress)
- One Line Configuration in Browser(TBD #2)
Those requirements are little bleeding edge because I believe pure typescript developers would love them.(I am)
- NodeJS v6 or above
- TypeScript v2 or above
I love typescript(because of angular 2), and I switched all my javascript code to typescript now, including my server components.
I also would like to write pure typescript npm modules,
which I think there is no need to compile to javascript any more,
because my environment is a full typescript stack
,
compile should only be ran at the final executation step.
There also many developers have the same idea as me.(see: The PAINs of Pure TypeScript Developer)
But there's no such a tool for us to run typescript smoothly for our need. for example:
ts-node
don't support load pure typescript library/module in node_modules directorytsconfig.json
is a too complicatedtypings.json
is too complicatedindex.d.ts
is too complicated- default file extension should be
.ts
, and should be the first dependencies file extention - run typescript in browser needs a lot of configuration(too complicated)
I believe that run typescript should be put at first class,
and be ran as easy as node
in server, or javascript
in browser,
without any more complicated configures.
this is the reason I decided to write this new tool pure-typescript
to make pure-typescript developers more happy.
- Can't have a "pure" typescript library.
- Fail to load pure typescript module from node_moules
- ts-node cannot import pure typescript npm module inside node_modules directory
Just replace node
by ts
$ npm install pure-typescript
$ ts main.ts
Just include pure-typescript in html head
<script src='//unpkg.com/pure-typescript'></script>
<script>
var tsMain = PureTypeScript('main.ts')
</script>
- Add keywords:
pure-typescript
in package.json - For Pure Typescript NPM Module, set main:
index.ts
in package.json
- run
purets
like node:purets pure-typescript-file.ts
- support load pure typescript module in
node_modules
directory - publish npm module: pure-typescript
- proxy right argv to ts program
Github Issue - https://github.com/zixia/pure-typescript/issues
[ ] Enable TypeScript in Browser by script src=//unpkg.com/pure-typescript
,
without any other configuration(like SystemJS?)
[ ] Cache management for large project to speed up startup loading time
Zhuohuan LI zixia@zixia.net (http://linkedin.com/in/zixia)
- Code & Docs 2016© zixia
- Code released under the ISC license
- Docs released under Creative Commons