Socket
Book a DemoInstallSign in
Socket

@glint/scripts

Package Overview
Dependencies
Maintainers
5
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glint/scripts

Scripts for working with Glint

latest
Source
npmnpm
Version
1.5.2
Version published
Weekly downloads
1.3K
33.79%
Maintainers
5
Weekly downloads
 
Created
Source

Glint scripts

A handful of tools for working with Glint—e.g. for migrations.

Usage

Each script can be invoked either directly from the npm registry with npx:

npx -p @glint/scripts {script-name} {...script-args}

Or by installing @glint/scripts as a project-local dependency and then executing a script directly:

npm install -D @glint/scripts
npx {script-name} {...script-args}
# or
yarn add --dev @glint/scripts
yarn {script-name} {...script-args}
# or
pnpm i -D @glint/scripts
pnpm {script-name} {...script-args}

Or with a global installation, using either your package manager or Volta:

volta install @glint/scripts
{script-name} {...script-args}

Scripts

migrate-glintrc

The migrate-glintrc script automates migrating from .glintrc.yml files to using a glint key within tsconfig.json files.

Usage:

npx -p @glint/scripts migrate-glintrc <path(s) to glintrc.yml files to migrate>

auto-glint-nocheck

The auto-glint-nocheck script automatically adds a {{! @glint-nocheck }} comment at the top of any templates in the given files that currently have type errors.

It accepts one or more globs specifying what files it should inspect for type errors.

This script can be used when first adopting Glint in an existing project in order to immediately begin enforcing type safety for new templates while incrementally converting existing ones over time. Templates with a @glint-nocheck directive will still benefit from best-effort editor support for features such as hover information, go-to-definition, etc, though the quality of these features will improve the closer the template and its backing module are to being completely typesafe.

Sample usage:

npx -p @glint/scripts auto-glint-nocheck '{app,tests}/**/*.{ts,hbs,gts}'

The nocheck directive prepended to multiline templates will include a brief explanatory comment. By default, this looks like {{! @glint-nocheck: not typesafe yet }}, but the message can be customized with the --explanation flag.

Note: this script requires that @glint/core >= v0.9.6 be available locally in the project where you are running it.

FAQs

Package last updated on 24 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts