{"_id":"@carbon-labs/vscode-snippets","_rev":"5-7fcce36ee95dd95fa0baedf9273e407e","name":"@carbon-labs/vscode-snippets","dist-tags":{"latest":"0.5.0"},"versions":{"0.2.0":{"name":"@carbon-labs/vscode-snippets","version":"0.2.0","keywords":["carbon","vscode","snippets","scss","carbon-design-system"],"author":{"name":"IBM"},"license":"Apache-2.0","_id":"@carbon-labs/vscode-snippets@0.2.0","maintainers":[{"name":"carbon-design-system","email":"carbon@us.ibm.com"},{"name":"tay1orjones","email":"taylor.jones826@gmail.com"},{"name":"carbon-bot","email":"carbondesignsystem@gmail.com"},{"name":"ibmdesign","email":"ibmdesign@us.ibm.com"},{"name":"jeffreychew","email":"jeff.chew@gmail.com"}],"homepage":"https://github.com/carbon-design-system/carbon-labs#readme","bugs":{"url":"https://github.com/carbon-design-system/carbon-labs/issues"},"dist":{"shasum":"9e4a3441ffac884006aa053e09c5958a5607954a","tarball":"https://registry.npmjs.org/@carbon-labs/vscode-snippets/-/vscode-snippets-0.2.0.tgz","fileCount":11,"integrity":"sha512-8x6s7yL58mdEBHGitjwcby+MFaQY1NdyDzu2Yiq4Gz7XgSM/QASCEuj3XlMQEzZKHWSqOSaK85ienXnJHahkMw==","signatures":[{"sig":"MEQCIAjXpOOj47fB0Da1zpO80m4wwyrnSYRrKXLSXh/iXKS2AiBf/rD+RY5BWmuzI/3DzfeqZBo6GUBK5IJgqndGPRupug==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@carbon-labs%2fvscode-snippets@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":59951},"main":"./post-install.js","type":"module","module":"./post-install.js","exports":{".":{"import":"./post-install.js","default":"./post-install.js"}},"gitHead":"5ea24fc7a8a62a1d2bc90a52cde2ce1478c29eb2","scripts":{"test":"node --experimental-vm-modules ../../node_modules/jest/bin/jest.js","build":"echo 'No build needed - static files only'","clean":"echo 'No clean needed - static files only'","postinstall":"node post-install.js"},"_npmUser":{"name":"carbon-bot","email":"carbondesignsystem@gmail.com"},"repository":{"url":"git+https://github.com/carbon-design-system/carbon-labs.git","type":"git","directory":"packages/vscode-snippets"},"_npmVersion":"lerna/9.0.3/node@v22.21.1+x64 (linux)","description":"Carbon Labs - VSCode snippets for Carbon Design System SCSS","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"^6.0.1","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/vscode-snippets_0.2.0_1768410185192_0.509678224732284","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@carbon-labs/vscode-snippets","version":"0.3.0","keywords":["carbon","vscode","snippets","scss","carbon-design-system"],"author":{"name":"IBM"},"license":"Apache-2.0","_id":"@carbon-labs/vscode-snippets@0.3.0","maintainers":[{"name":"carbon-design-system","email":"carbon@us.ibm.com"},{"name":"tay1orjones","email":"taylor.jones826@gmail.com"},{"name":"carbon-bot","email":"carbondesignsystem@gmail.com"},{"name":"ibmdesign","email":"ibmdesign@us.ibm.com"},{"name":"jeffreychew","email":"jeff.chew@gmail.com"}],"homepage":"https://github.com/carbon-design-system/carbon-labs#readme","bugs":{"url":"https://github.com/carbon-design-system/carbon-labs/issues"},"dist":{"shasum":"26a58bc4accbca220b9b1194858f21ceab85a718","tarball":"https://registry.npmjs.org/@carbon-labs/vscode-snippets/-/vscode-snippets-0.3.0.tgz","fileCount":11,"integrity":"sha512-rGkDB8rUH5wRK7XJb4GXy2il4cdj3T7tbJ82auHUItzYl5nt0qv3FWEbkT3f+i3cAr4ZdNPMW1YH8wmPu0g0LQ==","signatures":[{"sig":"MEYCIQCkk0Kw3d5qbiYhPhoOA5T++GJZJcT7hjiLcZSoA//6BwIhAKkZLWkBWv3aVovkUl4Z1dUlVBv43K6LPVo1+xEPM3iU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@carbon-labs%2fvscode-snippets@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":61205},"main":"./post-install.js","type":"module","module":"./post-install.js","exports":{".":{"import":"./post-install.js","default":"./post-install.js"}},"gitHead":"3d5cf28f2998ba7b1bebb822c956289eb8e7d8bc","scripts":{"test":"node --experimental-vm-modules ../../node_modules/jest/bin/jest.js","build":"echo 'No build needed - static files only'","clean":"echo 'No clean needed - static files only'","postinstall":"node post-install.js"},"_npmUser":{"name":"carbon-bot","email":"carbondesignsystem@gmail.com"},"repository":{"url":"git+https://github.com/carbon-design-system/carbon-labs.git","type":"git","directory":"packages/vscode-snippets"},"_npmVersion":"lerna/9.0.3/node@v22.21.1+x64 (linux)","description":"Carbon Labs - VSCode snippets for Carbon Design System SCSS","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"^6.0.1","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/vscode-snippets_0.3.0_1769096765948_0.25957358646881756","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@carbon-labs/vscode-snippets","version":"0.4.0","keywords":["carbon","vscode","snippets","scss","carbon-design-system"],"author":{"name":"IBM"},"license":"Apache-2.0","_id":"@carbon-labs/vscode-snippets@0.4.0","maintainers":[{"name":"carbon-design-system","email":"carbon@us.ibm.com"},{"name":"tay1orjones","email":"taylor.jones826@gmail.com"},{"name":"carbon-bot","email":"carbondesignsystem@gmail.com"},{"name":"ibmdesign","email":"ibmdesign@us.ibm.com"},{"name":"jeffreychew","email":"jeff.chew@gmail.com"}],"homepage":"https://github.com/carbon-design-system/carbon-labs#readme","bugs":{"url":"https://github.com/carbon-design-system/carbon-labs/issues"},"dist":{"shasum":"9758c6bb9989aad3914be10b47532fc78882565a","tarball":"https://registry.npmjs.org/@carbon-labs/vscode-snippets/-/vscode-snippets-0.4.0.tgz","fileCount":11,"integrity":"sha512-HnwYf+Zuqb5faWVlyAbd8zBjn/BIEf7xKggJ2uCOaOYkKb0g7b2769DJrckLpRUPF7TU0Iid2OXJmaycxwpzog==","signatures":[{"sig":"MEYCIQD/bL3LF6lNzsxrwuRdoE1x4V98pyiuJqYbXfNg3l1CKgIhAI9BKYOXy/2mU8zFZWkewOgqQFAo8PKBXZDF/In0PtQC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@carbon-labs%2fvscode-snippets@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":61182},"main":"./post-install.js","type":"module","module":"./post-install.js","exports":{".":{"import":"./post-install.js","default":"./post-install.js"}},"gitHead":"8c73258c32dbe6bf1dbdb7ac380355315a49a0d8","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest","build":"echo 'No build needed - static files only'","clean":"echo 'No clean needed - static files only'","postinstall":"node post-install.js"},"_npmUser":{"name":"carbon-bot","email":"carbondesignsystem@gmail.com"},"repository":{"url":"git+https://github.com/carbon-design-system/carbon-labs.git","type":"git","directory":"packages/vscode-snippets"},"_npmVersion":"lerna/9.0.3/node@v22.21.1+x64 (linux)","description":"Carbon Labs - VSCode snippets for Carbon Design System SCSS","directories":{},"sideEffects":false,"_nodeVersion":"22.21.1","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"^6.0.1","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/vscode-snippets_0.4.0_1769686468544_0.24201468582398666","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@carbon-labs/vscode-snippets","version":"0.5.0","keywords":["carbon","vscode","snippets","scss","carbon-design-system"],"author":{"name":"IBM"},"license":"Apache-2.0","_id":"@carbon-labs/vscode-snippets@0.5.0","maintainers":[{"name":"carbon-design-system","email":"carbon@us.ibm.com"},{"name":"tay1orjones","email":"taylor.jones826@gmail.com"},{"name":"carbon-bot","email":"carbondesignsystem@gmail.com"},{"name":"ibmdesign","email":"ibmdesign@us.ibm.com"},{"name":"jeffreychew","email":"jeff.chew@gmail.com"}],"homepage":"https://github.com/carbon-design-system/carbon-labs#readme","bugs":{"url":"https://github.com/carbon-design-system/carbon-labs/issues"},"dist":{"shasum":"cadd065898727b3876434f6e2b6485cba609540f","tarball":"https://registry.npmjs.org/@carbon-labs/vscode-snippets/-/vscode-snippets-0.5.0.tgz","fileCount":11,"integrity":"sha512-llUnj4NIg5b9gRuTLZbEDq2RbVqetM+dQWtDBAp2OUs+v/mGUFeJfU20s/59c36BdwmNVv6g4YkaEYPsqsgx9A==","signatures":[{"sig":"MEUCIQDKKQZiIQ6wTz3w/8AtTqydyg1F2+naE/gJ4LZ7WH04ngIgTFfDSJHLGQMxPWgFvedR/l3r2DK5+zMyeBJOxQrrdBA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@carbon-labs%2fvscode-snippets@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":61182},"main":"./post-install.js","type":"module","module":"./post-install.js","exports":{".":{"import":"./post-install.js","default":"./post-install.js"}},"gitHead":"aedc07fc6803a73f49614346a610480087d6116f","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest","build":"echo 'No build needed - static files only'","clean":"echo 'No clean needed - static files only'","postinstall":"node post-install.js"},"_npmUser":{"name":"carbon-bot","email":"carbondesignsystem@gmail.com"},"repository":{"url":"git+https://github.com/carbon-design-system/carbon-labs.git","type":"git","directory":"packages/vscode-snippets"},"_npmVersion":"lerna/9.0.3/node@v22.22.2+x64 (linux)","description":"Carbon Labs - VSCode snippets for Carbon Design System SCSS","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","rimraf":"^6.1.3","@jest/globals":"^29.7.0"},"_npmOperationalInternal":{"tmp":"tmp/vscode-snippets_0.5.0_1778719369395_0.21579648204361246","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-01-14T17:03:05.115Z","modified":"2026-08-21T15:34:49.315Z","0.2.0":"2026-01-14T17:03:05.332Z","0.3.0":"2026-01-22T15:46:06.130Z","0.4.0":"2026-01-29T11:34:28.683Z","0.5.0":"2026-05-14T00:42:49.543Z"},"bugs":{"url":"https://github.com/carbon-design-system/carbon-labs/issues"},"author":{"name":"IBM"},"license":"Apache-2.0","homepage":"https://github.com/carbon-design-system/carbon-labs#readme","keywords":["carbon","vscode","snippets","scss","carbon-design-system"],"repository":{"url":"git+https://github.com/carbon-design-system/carbon-labs.git","type":"git","directory":"packages/vscode-snippets"},"description":"Carbon Labs - VSCode snippets for Carbon Design System SCSS","maintainers":[{"email":"carbon@us.ibm.com","name":"carbon-design-system"},{"email":"carbondesignsystem@gmail.com","name":"carbon-bot"},{"email":"ibmdesign@us.ibm.com","name":"ibmdesign"},{"email":"jeff.chew@gmail.com","name":"jeffreychew"}],"readme":"# @carbon-labs/vscode-snippets\n\n> VSCode snippets for Carbon Design System SCSS\n\nThis package provides code snippets for Carbon Design System SCSS development,\ncompatible with VSCode, IBM Bob, and other VSCode-based IDEs.\n\n## Installation\n\n```bash\nnpm install @carbon-labs/vscode-snippets\n```\n\nor\n\n```bash\nyarn add @carbon-labs/vscode-snippets\n```\n\nThe package will automatically install snippet files to your project's `.vscode`\nfolder via a post-install script.\n\n### Viewing Installation Output\n\nTo see the installation output, use the `--foreground-scripts` flag:\n\n```bash\nnpm install @carbon-labs/vscode-snippets --foreground-scripts\n```\n\n## Snippet Files\n\nThe package installs the following organized snippet files:\n\n- **carbon-general.code-snippets** - Block class BEM pattern and @use imports\n- **carbon-linter-disables.code-snippets** - Stylelint disable comments\n- **carbon-spacing.code-snippets** - Spacing tokens\n  ($spacing-01 through\n  $spacing-13)\n- **carbon-typography.code-snippets** - Typography styles (@include type-style)\n- **carbon-motion.code-snippets** - Duration tokens and motion mixins\n- **carbon-theme.code-snippets** - Theme-related snippets\n\n## Usage\n\nAfter installation, the snippets are immediately available in your SCSS files.\nSimply start typing the snippet prefix and the IDE will suggest the completion.\n\n### Example Snippets\n\n- Type `block-class` to generate a BEM block class structure\n- Type `@use spacing` to import Carbon spacing utilities\n- Type `$spacing-05` to insert the spacing-05 token\n- Type `type` to access typography style mixins\n\n## How It Works\n\n1. After installation, the package automatically runs a post-install script\n2. The script copies all snippet files from the package to your project's\n   `.vscode/` folder\n3. VSCode and compatible IDEs automatically load all `.code-snippets` files from\n   `.vscode/`\n4. The snippets become immediately available in your SCSS files\n\n## Compatibility\n\nThis package works with:\n\n- **Visual Studio Code** - Microsoft's official IDE\n- **IBM Bob** - IBM's VSCode-based IDE\n- **VSCodium** - Open-source VSCode builds\n- **Cursor** - AI-powered VSCode-based IDE\n- Any other VSCode-based IDE that supports `.code-snippets` files\n\n## Notes\n\n- Snippets are installed at the workspace level (`.vscode/` folder)\n- Re-running package installation will overwrite any local modifications to the\n  snippet files\n- The `.vscode/` folder will be created automatically if it doesn't exist\n- Existing Carbon snippet files (from previous versions) are automatically\n  removed before installation\n\n## Development\n\n### Running Tests\n\nThe package includes comprehensive tests for the installation logic:\n\n```bash\ncd packages/vscode-snippets\nyarn test\n```\n\nTests cover:\n\n- Removing old snippet files (both old and new package name formats)\n- Copying snippet files to `.vscode` directory\n- Error handling for file system operations\n- Integration testing of the complete installation flow\n\nAll tests use mocked file system operations and run with Node's experimental VM\nmodules for ES module support.\n\n### Test Coverage\n\n- 12 tests covering all installation scenarios\n- Tests run automatically in CI on every PR and merge\n- Uses Jest with ES module support\n\n## License\n\nApache-2.0\n\n## Contributing\n\nThis package is part of the\n[Carbon Labs](https://github.com/carbon-design-system/carbon-labs) monorepo.\n","readmeFilename":"README.md"}