# roku-pm

> allow to log all funciton calls(and more, soon) in roku project

Latest version **1.0.5** (published 2023-05-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install roku-pm
pnpm add roku-pm
yarn add roku-pm
bun add roku-pm
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2023-05-29 |
| First published | 2023-05-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 53.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vasyl Martynych |
| Maintainers | vasyl-m |
| Keywords | roku, bsc, brighterscript, brightscript, scenegraph, britherscript |

## Links

- npm: https://www.npmjs.com/package/roku-pm
- npm.io page: https://npm.io/package/roku-pm

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2023-05-29
- 1.0.4 — 2023-05-25
- 1.0.3 — 2023-05-25
- 1.0.2 — 2023-05-25
- 1.0.1 — 2023-05-25
- 1.0.0 — 2023-05-24

## README

## how to add to project
1. in `package.json` add `"roku-pm": "^1.0.4"` to `"devDependencies"`
2. in `bsconfig.json` add `"roku-pm"` to `"plugins"` array, example  
```
{   
    ...
    "plugins": ["@rokucommunity/bslint", "roku-pm"],
    ...
}
```

## how to setup/modify config for `roku-pm`
1. in `bsconfig.json` add `"roku-pm"` to config, example  


```
{   
    ...
    "plugins": ["@rokucommunity/bslint", "roku-pm"],
    "roku-pm": {
        "logFuncLocation": false
    },
    ...
}
```

config values:
| Property | Type | default | Description |
| -------- | ------- | ------  |  ------  |
| functionLogTemplate  | string | '?">> ${name}() ${location}"' | template or code that will be inserted after each function declaration, there are two placeholders: `${name}` - is function name, and `${location}` - is location where function is declared
| logAnonFunc | boolean | true | if true, then will add logs for anonymous functions 
| logFuncLocation | boolean | true | if true, then will add function location to log for common functions
| logAnonFuncLocation | boolean | true | if true, then will add function location to log for anonymous functions
| logReturn | boolean | false | if true, then will add logs before each return or before function body end
| logIfBlock | boolean | false | if true, then will add logs for each body of if/else blocks
| addImports    | string[] | [] | will add those list of scripts location (strings) to xml as `<script/>`, example: `"addFiles": ["pkg:/source/someFile.brs"]`
| addFiles    | {uri: string, file: string}[] | [] | will create files at specified locations, example: `"addFiles": [{uri:"pkg:/source/someFile.brs", "file": "sub helloWorld \n ?\"hello world\" \n end sub"}]`
| files    | string[] | ["**/*"] | list of files/directories(glob pattern) that should be processed, or ignored if use negative `!`, example `"files": ["include/this/**/*", "!ignore/this/**/*"]`

---
_Source: https://npm.io/package/roku-pm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
