0.1.2 • Published 3 years ago
easy-clts v0.1.2
Easy Client TypeScript
Small script that comments parts of your code and adds //@ts-nocheck before compiling.
Features
File you are editing:
/** Easy-CLTS: start */
import foo from 'bar';
/** Easy-CLTS: stop */
...
File that gets compiled:
// @ts-nocheck
/** Easy-CLTS: start */
//import foo from 'bar';
/** Easy-CLTS: stop */
...
Setup Instructions
Create a tsconfig.json file in the directory where you write your TypeScript-Files which are intended for use in the client's browser as a JavaScript-File. You just need outDir
, and include
, other options like extends
and rootDir
may be suited for your project as well. The following file is an example:
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../js",
"rootDir": "./ezclts"
},
"include": [
"ezclts"
]
}
Syntax
There are two options to use easy-clts. You can build all files in a folder or watch a folder and compile files on changes.
easy-clts {build|watch} -p PATH_TO_FOLDER
I would recommend creating scripts in your package.json, so there is no need to type the path again and again.