# tisk

> Alternative TypeScript compiler CLI

Latest version **2.0.0** (published 2024-01-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install tisk
pnpm add tisk
yarn add tisk
bun add tisk
```

Provides the command `tisk`.

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2024-01-13 |
| First published | 2018-10-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 3 |
| Unpacked size | 19.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Mohamed Akram |
| Maintainers | mohd-akram |
| Keywords | typescript, simple, script, compiler |

## Links

- npm: https://www.npmjs.com/package/tisk
- Repository: https://github.com/mohd-akram/tisk
- Homepage: https://github.com/mohd-akram/tisk#readme
- Issues: https://github.com/mohd-akram/tisk/issues
- npm.io page: https://npm.io/package/tisk

## Dependencies (3)

- [glob](https://npm.io/package/glob.md) ^10.3.10
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [argparse](https://npm.io/package/argparse.md) ^2.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

- 2.0.0 (latest) — 2024-01-13
- 1.0.9 — 2020-10-23
- 1.0.8 — 2019-01-09
- 1.0.7 — 2018-10-13
- 1.0.6 — 2018-10-12
- 1.0.5 — 2018-10-12
- 1.0.4 — 2018-10-11
- 1.0.3 — 2018-10-10
- 1.0.2 — 2018-10-10
- 1.0.1 — 2018-10-10
- 1.0.0 — 2018-10-10

## README

tisk
====

`tisk` is a simpler alternative to `tsc`, the standard TypeScript compiler CLI.

Synopsis
--------

```
usage: tisk [-h] [-v] [-o OUTPUT] [-d] [-m] [-p PATH] [-W WARNING]
            [file [file ...]]
```

Examples
--------

```shell
# Output to stdout
echo "console.log('Hello, world')" | tisk | node

# All warnings as errors
tisk -Werror -o lib src

# Specific warnings as errors
tisk -Werror=implicit-any -Wimplicit-this -o lib src

# Source maps
tisk -m -o lib src

# Declarations
tisk -d -o lib src

# Map external import paths based on output directory
# Input: src/main.ts: import * as vendor from '../vendor'
# Output: dist/lib/main.js: import * as vendor from '../../vendor'
tisk -p vendor -o dist/lib src
# or
# Input: src/main.ts: import * as vendor from '../vendor'
# Output: dist/lib/main.js: import * as vendor from '../../libs'
tisk -p vendor:libs -o dist/lib src
```

Differences from `tsc`
----------------------

`tisk` follows references to imports but does not compile them. To illustrate
this:

```terminal
$ mkdir example && cd example
$ mkdir src && echo "export {}" > src/index.ts
$ echo "import * as m from './src';" > main.ts
$ tsc --outDir lib main.ts
$ ls lib
main.js	src
$ rm -r lib
$ tisk -o lib main.ts
$ ls lib
main.js
```

As you can see, `tsc` brings in the `src` directory, compiles it, and outputs
the result to `lib` while `tisk` only compiles the input files provided.

Because `tisk` behaves this way, its output is completely predictable and you
can, for example, run it in parallel, splitting the input set any way you want.

### Automatic relative import path mapping

`tisk` will automatically fix relative import paths among the set of input
files and directories. This can allow you to, for example, combine two
directories:

```terminal
$ tisk -o lib src1 src2
```

If a file in `src2` imports from `src1` like so:

```typescript
import * as foo from '../src1/foo';
```

On output, it will be transformed to:

```javascript
import * as foo from './foo';
```

To map import paths that aren't in the set of inputs (eg. they might be
compiled in a separate invocation), use the `-p` option as shown in the
examples above.

Warnings
--------

```javascript
{
  'strict': 'strict',
  'implicit-any': 'noImplicitAny',
  'implicit-returns': 'noImplicitReturns',
  'implicit-this': 'noImplicitThis',
  'implicit-fallthrough': 'noFallthroughCasesInSwitch',
  'unused-locals': 'noUnusedLocals',
  'unused-parameters': 'noUnusedParameters'
}
```

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