@valtech-commerce/json-to-scss
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@valtech-commerce/json-to-scss

npm npms.io: Score libraries.io: SourceRank License: MIT

Convert a JSON to a SCSS map

Install

$ npm install @valtech-commerce/json-to-scss

Usage

const jsonToScss = require('@valtech-commerce/json-to-scss');

console.log(
  jsonToScss.convert(`
    {
      "points": [
        [0, 1.2],
        [50, 1.6],
        [200, 1.8]
      ],
      "dimension": {
        "small":   600,
        "medium":  900,
        "large":  1200,
        "xlarge": 1500
      },
      "transition": {
        "hover":     100,
        "animation": 500
      },
      "color": {
        "shell": {
          "main":  "#659d32",
          "shade": "#618931"
        },
        "fruit": "#423228"
      }
    }
  `)
);

/*
$points: (
  0 1.2,
  50 1.6,
  200 1.8
);

$dimension: (
  'small': 600,
  'medium': 900,
  'large': 1200,
  'xlarge': 1500
);

$transition: (
  'hover': 100,
  'animation': 500
);

$color: (
  'shell': (
    'main': #659d32,
    'shade': #618931
  ),
  'fruit': #423228
);
*/

Source

Forked from razwan/json-to-sass-map

License

MIT © Valtech Canada inc.

Readme

Keywords

Package Sidebar

Install

npm i @valtech-commerce/json-to-scss

Weekly Downloads

23

Version

1.0.1

License

MIT

Unpacked Size

5.43 kB

Total Files

5

Last publish

Collaborators

  • valtech_commerce_ci
  • jblandry
  • valtech_commerce