Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sketchmine/sketch-color-replacer

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sketchmine/sketch-color-replacer

Replaces a set of colors with a given set of colors

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by450%
Maintainers
3
Weekly downloads
 
Created
Source

Github banner for sketchmine

@sketchmine/sketch-color-replacer

The sketch-color-replacer is a CLI tool for replacing a set of legacy colors with new colors. We had the need @Dynatrace to replace over 80 colors, over multiple files with the new brand colors.

  • @sketchmine/sketch-color-replacer

Dependency graph

Dependency graph of the sketchmine sketch-color-replacer

Prerequisites

The color-replacer needs a ./colors-json file provided with the colors that need to be replaced and of course a .sketch file where the replacement should be applied.

The colors.json file follows following convention:

{
  "legacycolor": "newcolor",
  "#AJ54K0": "#333333",
  ...
}

Installation

Installing the package can be performed with yarn or npm. yarn add @sketchmine/sketch-color-replacer will add the executable and the typings to your node_modules folder.

Run the replacer

To execute the colors replacer you can go ahead with the .bin like npx skm-color-replacer --colors /path/to/colors.json --file /path/to/file.sketch.

Want to contribute?

If you find a bug or a missing feature, please let us know your solution so that we can document it

Building the package

For building the package Rollup.js is used as a module bundler. The configuration can be found in the rollup.config.js and is orchestrated by the yarn package manager. The package bundle is in the commonjs format and meant to be consumed only be node.js applications.

The build can be started with the following two commands:

  • yarn build for building the package.
  • yarn dev for building and watching the sources of the package. (rebuilds after safe)

Linting

The source code of this package is going to be linted by our CI environment. To ensure a coding standard and quality use the configured linter tslint. This package extends from the tslint-config-airbnb and the linting configuration extends from the root tslint.json.

run yarn lint to execute the linter.

Testing

Sorry but currently there are no tests specified. 😭 Feel free to add some! 💪🏻

Keywords

FAQs

Package last updated on 09 May 2019

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