forked from GitHub/gf-core
TypeScript readme
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
`gflib.ts` is a TypeScript implementation of the GF runtime.
|
||||
It is ported from an older JavaScript implementation [`gflib.js`](../javascript/gflib.js),
|
||||
with some small improvements.
|
||||
with some improvements.
|
||||
|
||||
Importantly, all **future** updates will only be made to this TypeScript version.
|
||||
|
||||
@@ -15,11 +15,16 @@ So its features are limited and it is not efficient, making it really only usefu
|
||||
## Using
|
||||
|
||||
`gflib.ts` can be transpiled to JavaScript by running `tsc` in this folder (of course you need TypeScript installed).
|
||||
It has no module depenedencies.
|
||||
You can then include the generated `gflib.js` file in your application as usual.
|
||||
It has no module dependencies.
|
||||
You can then include the generated `js/gflib.js` file in your application as usual.
|
||||
|
||||
_This generated JavaScript version is also included under version control,
|
||||
to make it easy for someone to use without having to install TypeScript._
|
||||
|
||||
Your GF grammar should be compiled with: `gf --make --output-format=js`
|
||||
|
||||
For an example of a working web application using the JavaScript runtime, see `../javascript`.
|
||||
|
||||
## What happened to `gflib.d.ts`?
|
||||
|
||||
There was once a file here called `gflib.d.ts`, which contained TypeScript type definitions for the **old** `gflib.js`.
|
||||
|
||||
Reference in New Issue
Block a user