makit-recipe-tsc
v1.1.2
Published
![Language](https://img.shields.io/badge/-TypeScript-blue.svg) [![Build Status](https://travis-ci.org/searchfe/makit-recipe-tsc.svg?branch=master)](https://travis-ci.org/searchfe/makit-recipe-tsc) [![Coveralls](https://img.shields.io/coveralls/searchfe/ma
Downloads
5
Readme
makit-recipe-tsc
makit-recipe-tsc
Install
npm i makit-recipe-tsc --save-dev
Get Start
In the following code, ctx is the context of makit.
const compiler = new CustomCompiler({
baseDir: `${__dirname}/src2`,
outDir: `${__dirname}/src2/dist`
});
await compiler.compile(ctx);
Add a plugin
interface Plugin {
getDepencies?: (context: PluginContext) => string[]
beforeMakeDepencies?: (filePaths: string[], baseDir: string, outDir: string) => string[]
onPreCompile?: (context: PluginContext) => string
afterCompile?: (context: PluginContext) => string
onDest?: (context: PluginContext) => boolean
}
const plugin: Plugin = {
// ...
}
compiler.addPlugin(plugin);