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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@carbon-labs/vscode-snippets

v0.4.0

Published

Carbon Labs - VSCode snippets for Carbon Design System SCSS

Downloads

475

Readme

@carbon-labs/vscode-snippets

VSCode snippets for Carbon Design System SCSS

This package provides code snippets for Carbon Design System SCSS development, compatible with VSCode, IBM Bob, and other VSCode-based IDEs.

Installation

npm install @carbon-labs/vscode-snippets

or

yarn add @carbon-labs/vscode-snippets

The package will automatically install snippet files to your project's .vscode folder via a post-install script.

Viewing Installation Output

To see the installation output, use the --foreground-scripts flag:

npm install @carbon-labs/vscode-snippets --foreground-scripts

Snippet Files

The package installs the following organized snippet files:

  • carbon-general.code-snippets - Block class BEM pattern and @use imports
  • carbon-linter-disables.code-snippets - Stylelint disable comments
  • carbon-spacing.code-snippets - Spacing tokens ($spacing-01 through $spacing-13)
  • carbon-typography.code-snippets - Typography styles (@include type-style)
  • carbon-motion.code-snippets - Duration tokens and motion mixins
  • carbon-theme.code-snippets - Theme-related snippets

Usage

After installation, the snippets are immediately available in your SCSS files. Simply start typing the snippet prefix and the IDE will suggest the completion.

Example Snippets

  • Type block-class to generate a BEM block class structure
  • Type @use spacing to import Carbon spacing utilities
  • Type $spacing-05 to insert the spacing-05 token
  • Type type to access typography style mixins

How It Works

  1. After installation, the package automatically runs a post-install script
  2. The script copies all snippet files from the package to your project's .vscode/ folder
  3. VSCode and compatible IDEs automatically load all .code-snippets files from .vscode/
  4. The snippets become immediately available in your SCSS files

Compatibility

This package works with:

  • Visual Studio Code - Microsoft's official IDE
  • IBM Bob - IBM's VSCode-based IDE
  • VSCodium - Open-source VSCode builds
  • Cursor - AI-powered VSCode-based IDE
  • Any other VSCode-based IDE that supports .code-snippets files

Notes

  • Snippets are installed at the workspace level (.vscode/ folder)
  • Re-running package installation will overwrite any local modifications to the snippet files
  • The .vscode/ folder will be created automatically if it doesn't exist
  • Existing Carbon snippet files (from previous versions) are automatically removed before installation

Development

Running Tests

The package includes comprehensive tests for the installation logic:

cd packages/vscode-snippets
yarn test

Tests cover:

  • Removing old snippet files (both old and new package name formats)
  • Copying snippet files to .vscode directory
  • Error handling for file system operations
  • Integration testing of the complete installation flow

All tests use mocked file system operations and run with Node's experimental VM modules for ES module support.

Test Coverage

  • 12 tests covering all installation scenarios
  • Tests run automatically in CI on every PR and merge
  • Uses Jest with ES module support

License

Apache-2.0

Contributing

This package is part of the Carbon Labs monorepo.