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

json-to-flat-sass

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-to-flat-sass

Converts JSON to Sass

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
448
decreased by-37.08%
Maintainers
1
Weekly downloads
 
Created
Source

json-to-flat-sass

Generates "flat" sass variables from your JSON.

There's quite a few libraries around that generate Sass from a JSON files. This one provides support for older versions of Sass (<3.3) which do not support (Advanced Variable Functions)[https://sass-lang.com/documentation/variables#advanced-variable-functions].

TL;DR This:

{ 
    "colours": {
        "red": {
            "100": "#ff4343";
            "200": "#e11f1f";
            "300": "#bf0c0c";
        }
    }
}

transforms to this:

$colours-red-100: "#ff1313"
$colours-red-200: "#e11f1f";
$colours-red-300: "#bf0c0c";

Usage

Install

yarn add @actuallyacat/json-to-flat-sass

Usage

json-to-flat-sass <input> <output> [<optional-separator>]

FAQs

Package last updated on 14 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

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