0.0.1 • Published 3 years ago
ts-ucode v0.0.1
ts-ucode
TypeScript tools for OpenWRT ucode.
This is a WIP. It does work, but there is a lot to be done and a lot to improve. PR are welcome!
Usage
Install ts2ucode globally
npm install -g ts-ucodeInitialize a project dir (for completion and npm scripts)
# within the directory to initialize
ts2ucode initTransform TypeScript sources into ucode:
If ran from a ts-ucode initialized directory:
ts2ucodeor from anywhere else:
ts2ucode <source-dir> <out-dir>Features
- compiler
- compile source dir to target dir
- compile standalone source file
- user friendly errors using TS diagnostics
- initialize project
- create a
package.json(improvements needed) - create a
tsconfig.json(improvements needed) - ...
- create a
- Typings/IDE completions
- removed standard JS lib
- ucode core functions
uloop(some fixes/improvements needed)ubus(some fixes/improvements needed)fs(incomplete?)uci(incomplete for packages)mathnl80211resolvstructrtnl
- transformers
- default parameters
undefined=>null- methods to functions
- arrow function compatibility
- exports grouped at the end
for (.. of ..)=>for (.. in ..)throw- fixes
importpaths - destructuring arrays
- destructuring objects
- classes
private/protected/publicmembers (static or not)constructor(as well as members in parameters)- member initializers
- inheritance
superkeyword
- decorators
- functions
- class
- class members
- test runner (WIP, not even in this repo but to be imported from private closed sources)
- run on docker
- run on specific device
0.0.1
3 years ago