npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

snipescript

v1.0.56

Published

A custom TypeScript compiler that compiles a specific folder and generates an error tree.

Downloads

9

Readme

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.