1.0.56 • Published 2 years ago

snipescript v1.0.56

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

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.

1.0.56

2 years ago

1.0.55

2 years ago

1.0.54

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.49

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.46

2 years ago

1.0.45

2 years ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.40

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago

1.0.33

2 years ago

1.0.32

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago