PixelOven.Compile
Overview
Compile is a simple wrapper for standard JavaScript/TypeScript compilation. It currently acts as proxy for the TypeScript compiler.
TypeScript
Argument | Description |
---|---|
ts | A proxy for the TypeScript compiler with a few opinionated defaults for easier setup. |
tsx | An alias for ts . Implemented to help differentiate JSX based projects. |
Options
For reference on all the available options please review the official documentation for TypeScript.
Setup
Be sure to create a tsconfig.json file at the root of the project or in other words adjacent to the package.json.
It is important to note that PixelOven makes a few assumptions for ease integration and will default to TypeScript's own default values if a config is not provided. The CLI will warn if this configuration is missing.
The above configuration file is not an exhaustive example but instead represents our recommendation for getting started. Please review the official documentation for more advanced configurations.
Usage
Once configured we can compile our source using a cmd similar what you see below.
We can also target specific files.
TypeScript options can be passed through the CLI but it is highly recommended that this behavior be managed with in a tsconfig.json file.