New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ast-grep/create-lang

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ast-grep/create-lang

## Usage

  • 0.0.0-prerelease-4
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@ast-grep/create-lang

Usage

# create a new language package in current directory
pnpm create @ast-grep/lang
# create package in a specific directory
pnpm create @ast-grep/lang some-dir

You will be prompted to enter the language name, the language file extension, package name and tree-sitter grammar package.

Note the tree-sitter grammar package is different from the package name. package name is the repo you create, tree-sitter package should be a package already published on npm.

Commands

After the package is created, you can use these commands:

pnpm source # copy tree-sitter grammar files to the src folder
pnpm build # build the tree-sitter grammar files to dynamic lib
pnpm test # test the tree-sitter grammar files

Test file

You can edit nursery.js to add test case for your language.

Keywords

FAQs

Package last updated on 17 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc