TypeScript Pack
Compile
TypeScript
toJavaScript
.
-
esbuild
compilests
andtsx
files tojs
files. -
eslint
lintsts
andtsx
files via.eslintrc
.
Overview
Setup
TypeScript Pack
is included in the complete
edition.
Current Release
npm install --save-dev @packmule/typescript-pack typescript @babel/core
Nightly Build
npm install --save-dev @packmule/typescript-pack@nightly typescript @babel/core
API
Methods
include(glob: string)
Configure files to be processed. If not used, all files will be processed.
Hints
View the
packmule
hints documentation for more information.
-
cache - Controls cache utilization for
eslint
. -
lint - Controls source-code linting via
eslint-webpack-plugin
. -
fix - Controls source-code fixing via
eslint-webpack-plugin
. - map - Controls source map creation.
-
watch - If enabled, only changed files are linted via
eslint-webpack-plugin
.
Usage
View the
packmule
API documentation for general usage patterns.
Basic Usage
Configure TypeScript
to JavaScript
compilation.
import Packmule from '@packmule/core';
import TypeScriptPack from '@packmule/typescript-pack';
const packmule = new Packmule();
packmule.add(new TypeScriptPack());
return packmule.generate();
Internals
Dependencies
This dependencies are used primarily by the pack internally.
esbuild-loader
eslint-webpack-plugin
These peer dependencies are needed to use the pack.
esbuild
eslint