New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

mbsprite

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mbsprite

Command line utilities for bundling and exploding Mapbox spritesheets to/from PNG files.

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
19
-17.39%
Maintainers
1
Weekly downloads
 
Created
Source

mbsprite: Command line utilities for Mapbox sprites

This tool lets you create a Mapbox GL spritesheet from a number of PNGs. You can also disassemble a Mapbox spritesheet into its component pngs. It supports both @1x and @2x icons.

Unlike sprite-zero, which works on SVGs, this only works on PNGs.

mbsprite explode

To explode all the icons from a Mapbox sprite sheet into icons and icons@2x:

node mbsprite explode https://api.mapbox.com/styles/v1/mapbox/light-v9/sprite?access_token=pk.eyYOURACCESSTOKEN icons

mbsprite bundle

To bundle all the icons back into a sprite sheet in sprite/sprite.json, sprite/sprite.png, sprite/sprite@2x.json and sprite/sprite@2x.png:

node mbsprite bundle sprite icons icons@2x

Merging spritesheets

To merge two spritesheets together, simply explode two sprite sheets into the same directory, then bundle.

Usage with npx

If you have npx installed, you can simply run:

npx mbsprite <args...>

Using with Figma

To generate a spritesheet from icons in Figma, see the instructions in Figmasset-export.

Keywords

mapbox

FAQs

Package last updated on 09 Sep 2021

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