Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxiy01/tstl-log-lua
https://github.com/maxiy01/tstl-log-lua
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maxiy01/tstl-log-lua
- Owner: maxiy01
- Created: 2021-12-09T11:12:16.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-09T11:12:18.000Z (about 3 years ago)
- Last Synced: 2024-09-25T21:29:15.969Z (3 months ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TSTL json.lua
Declarations for [log.lua](https://github.com/rxi/log.lua), A tiny logging module for Lua.
| Command | Description |
|-|-|
| `yarn add -D tstl-log-lua` | Install these declarations |
| `yarn add rxi/log.lua` | Install log.lua |Upon installation these declarations can be linked to a _tsconfig.json_ file.
```json
{
"compilerOptions": {
"types": [
"tstl-log-lua"
]
}
}
```And used within any _.ts_ file.
```ts
import * as log from "log";log.usecolor = true;
log.info("Hello world!");
```
Make sure to append `";./node_modules/log.lua/?.lua"` to your `package.path` in a _conf.ts_ file (this is run first) to assist where Lua looks for modules.
```ts
package.path += ";./node_modules/log.lua/?.lua";
```Also you need to add `"typescript-to-lua/language-extensions"` to _tsconfig.json_ file.
```json
{
"compilerOptions": {
"types": [
"typescript-to-lua/language-extensions"
]
}
}
```