Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

style-dictionary-npm-example

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

style-dictionary-npm-example

This example shows how to set up a style dictionary as an npm module, either to publish to a local npm service or to publish externally.

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Style Dictionary as an npm module

This example shows how to set up a style dictionary as an npm module, either to publish to a local npm service or to publish externally.

When you publish this npm module, the prepublishOnly hook will run, calling the style dictionary build system to create the necessary files.

Running the example

First of all, set up the required dependencies running the command npm install in your local CLI environment (if you prefer to use yarn, update the commands accordingly).

At this point, run npm run build. This command will generate the files in the build folder.

What to look at

Open the package.json file and see how in this specific example there is an extra prepublishOnly command script, that builds the dictionary.

This command is run automatically before the package is prepared and packed via the npm publish command.

FAQs

Package last updated on 06 Feb 2020

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