snipescript v1.0.56
SnipeScript - Scope Compiler š
SnipeScript is a custom TypeScript compiler that compiles a specific folder and generates an error tree. It allows you to selectively filter errors by error codes and folder paths. The output of the program is a JSON file containing the error tree, making it easy to analyze and manage the TypeScript compilation errors.
Sorry for breaking up this generic AI generated text, but I like to tell you about my lord and saviour Mr. Ai. Well, actually i did make this project with my own AI purposes in mind. Anyways, back to the script!
Features āØ
- Compiles a specific folder containing TypeScript files.
- Generates an error tree for easier error analysis.
- Allows filtering errors by error codes and folder paths.
- Saves the output as a JSON file.
Installation šØ
To use SnipeScript, you will need to have Node.js installed on your system. After that, you can install SnipeScript as a global package by running the following command:
npm install -g snipescript
Usage š
To compile a specific folder and generate the error tree, run the following command:
snipescript <folder-path>
Replace with the path to the folder containing your TypeScript files.
The output will be saved to an output.json file in the current directory.
Configuration š§
You can customize the behavior of SnipeScript by modifying the script. For example, you can add or remove error codes to ignore by updating the ignoredErrorCodes array:
const ignoredErrorCodes = [17004, 1259, 1208, 2339, 2351]; // Add the error codes you want to ignore
You can also update the TypeScript compiler options by modifying the options object:
const options = {
target: ts.ScriptTarget.ES2020,
module: ts.ModuleKind.CommonJS,
strict: true,
noEmit: true,
};
How it works š
āāāāāāāāāāāāāāāāāāāāāāāāāāā
Target Folder Execute in CLI:
(provided by the user) "snipescript <folder-path>"
āāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāā
Main Function
(entry point of the app)
āāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāā
readFilesRecursively
(get list of all files in
target folder)
āāāāāāāāāāāāā¬āāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāā
Filtered File Names
(files within the target
folder)
āāāāāāāāāāāāā¬āāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāā
Compilation
(use TypeScript compiler to
check for syntax errors)
āāāāāāāāāāāāā¬āāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāā
Filtered Error Details
(errors within the target
folder)
āāāāāāāāāāāāā¬āāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāā
Generated File and Folder
Structure
āāāāāāāāāāāāā¬āāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāā
File and Directory Nodes
(used to display the file
and folder tree)
āāāāāāāāāāāāā¬āāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāā
Error Details Object
(associated with each file
and directory)
āāāāāāāāāāāāāāāāāāāāāāāāāāā
License
SnipeScript is released under the MIT License.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago