# @epandco/riot-typescript-preprocessor

> Riot TypeScript preprocessor for the Unthink Stack

Latest version **1.2.1** (published 2020-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @epandco/riot-typescript-preprocessor
pnpm add @epandco/riot-typescript-preprocessor
yarn add @epandco/riot-typescript-preprocessor
bun add @epandco/riot-typescript-preprocessor
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2020-09-14 |
| First published | 2020-07-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 20.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | EP+Co |
| Maintainers | matthew.philyaw, lukecjohnson, lxndrdagreat, epco-ctlabs |
| Keywords | unthink, stack, typescript, riot |

## Links

- npm: https://www.npmjs.com/package/@epandco/riot-typescript-preprocessor
- npm.io page: https://npm.io/package/@epandco/riot-typescript-preprocessor

## Dependencies (5)

- [eslint](https://npm.io/package/eslint.md) ^7.8.1
- [typescript](https://npm.io/package/typescript.md) ^4.0.2
- [strip-indent](https://npm.io/package/strip-indent.md) ^3.0.0
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^4.0.1
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^4.0.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2020-09-14
- 1.0.0 (beta) — 2020-07-31
- 1.2.0 — 2020-09-03
- 1.1.2 — 2020-08-25
- 1.1.1 — 2020-08-25
- 1.1.0 — 2020-08-25

## README

# Riot TypeScript Preprocessor

This is a utility used by the Unthink Stack. It is a Riot preprocessor that
compiles TypeScript inside of the Riot components.

## Installation

    npm i --save-dev @epandco/riot-typescript-preprocessor

## Usage

In your build script, init the preprocessor by passing in the
`registerPreprocessor` function from `@riotjs/compiler`:

```javascript
const {registerPreprocessor} = require('@riotjs/compiler');

const { initRiotTypeScriptPreprocessor } = require('@epandco/riot-typescript-preprocessor');

initRiotTypeScriptPreprocessor(registerPreprocessor);
```

## Options

You can provide additional options to the init function. Each is optional.

```javascript
initRiotTypeScriptPreprocessor(registerPreprocessor, {

// Path to the eslint config file.
// Default is the process root.
eslintConfigPath: '...',

// Path to the typings for Riot files.
// Default is sourcePath + /client/typings.d.ts
riotTypingsPath: '...',

// Paths to additional typings (.d.ts) files
additionalTypings: ['...'],

// Root path for the source files.
// Defaults to './src'.
sourcePath: '...',

// Path to the tsconfig file to use with the TypeScript compiler.
// Defaults to the clientRootPath + 'tsconfig.json'.
tsconfigPath: '...',

// Set to true to disable the custom module resolver function.
// Defaults to false.
disableCustomResolver: false,

// Set to true to enable debug logging of module resolution.
// Defaults to false
logModuleResolution: false

});
```

---
_Source: https://npm.io/package/@epandco/riot-typescript-preprocessor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
