8.24.0 • Published 6 years ago

@brad-jones/tsos-compiler v8.24.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

TypeScript on Steroids

CircleCI codecov Conventional Commits TypeScript

So if TypeScript is JavaScript on Steroids, this project is, well you get the idea...

No really what is this?

In short this provides, ts-node + ts-simple-ast in one executable but it is so much more.

NOTE: v1 of tsos was based on https://github.com/wix/tspoon
Read more about it's deprecation here: https://github.com/wix/tspoon/issues/136

TypeScript is awesome however it does lack some features from more established programming languages. Reflection is one such feature that I am always wishing was more powerful. This is not so much a TypeScript issue, it's more to do with the fact that TypeScript is just JavaScript and Js is very poor in this area.

With ts-simple-ast we can effectively extend the TypeScript language to support some of these concepts. For example automatically applying a @decorator to every class so that design time meta data is output by the TypeScript transpiler.

But now we have non portable TypeScript source code. This project aims to solve this problem by making ts-simple-ast vistor modules shareable between TypeScript code bases.

Reflection vs Transpilation

Intially I started this project with the idea of sharing my existing tspoon vistors that make reflection more powerful in TypeScript.

But then I got thinking that there are situations that instead of using a reflective model to build some dynamic object at run time. Perhaps we can get the same end result by simply applying more transpilations.

I wrote the above in v1, now some 12 or so months later in v2 this exactly what I am doing in my TypeScript projects, basically you do all your reflection at build time using the AST, before that very rich type information is discarded.

Project Structure

We are now running a lerna monorepo setup.

NOTE: This is likely to change, I miss semantic release. Plus I think Npm Org's match up nicely with Github Org's, release notes and version tags then make more sence, etc. Kind of thinking lerna + git submodules but better :)

  • @brad-jones/tsos-compiler: This is the brains of the operation. Essentially it is a very simple layer over the top of TsSimpleAst. If you want to use tsos programatically this is the project you want.

  • @brad-jones/tsos-cli: This package exposes the compiler via a console application. It currently provides 2 main sub commands.

    • run: A ts-node like execution environment but uses the tsos-compiler to compile TypeScript with visitors on the fly.

    • build: A project based build tool using tsos-compiler.

  • @brad-jones/tsos-visitors: This is (or will be) a collection of core tsos visitors. This package is completely optional, only install it if you have a need for one of the visitor modules, otherwise write your own.

8.24.0

6 years ago

8.23.0

6 years ago

8.22.0

6 years ago

8.21.0

6 years ago

8.20.0

6 years ago

8.19.0

6 years ago

8.18.0

6 years ago

8.17.0

6 years ago

8.16.0

6 years ago

8.15.1

6 years ago

8.15.0

6 years ago

8.14.0

6 years ago

8.13.0

6 years ago

8.12.0

6 years ago

8.11.0

6 years ago

8.10.0

6 years ago

8.9.0

6 years ago

8.8.0

6 years ago

8.7.0

6 years ago

8.6.0

6 years ago

8.5.0

6 years ago

8.4.0

6 years ago

8.3.0

6 years ago

8.2.0

6 years ago

8.1.0

6 years ago

8.0.0

6 years ago

7.0.0

6 years ago

6.21.0

6 years ago

6.20.0

6 years ago

6.19.0

6 years ago

6.18.0

6 years ago

6.17.0

6 years ago

6.16.0

6 years ago

6.15.0

6 years ago

6.14.0

6 years ago

6.13.0

6 years ago

6.12.0

6 years ago

6.11.0

6 years ago

6.10.0

6 years ago

6.9.0

6 years ago

6.8.2

6 years ago

6.8.1

6 years ago

6.8.0

6 years ago

6.7.0

6 years ago

6.6.0

6 years ago

6.5.0

6 years ago

6.4.0

6 years ago

6.3.1

6 years ago

6.3.0

6 years ago

6.2.0

6 years ago

6.1.0

6 years ago

6.0.1

6 years ago

6.0.0

6 years ago

5.2.0

6 years ago

5.1.2

6 years ago

5.1.0

6 years ago

5.0.0

6 years ago

2.1.1

6 years ago

2.1.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

2.0.0-rc.3

7 years ago

2.0.0-rc.2

7 years ago

2.0.0-rc.1

7 years ago