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

ads-scss-tokens-node

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ads-scss-tokens-node - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

src/dictionary.js

2

package.json
{
"name": "ads-scss-tokens-node",
"version": "0.0.1",
"version": "0.0.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "tokens.scss",

# js-tokens-to-scss
This package is a POC of converting JS-based Design Tokens into a SCSS file that displays the values of the tokens as SASS vars.
# Todo
1. Need to look at namespacing vars:
eg. $primary is too vague in a SCSS context; probably need $ads-primary

@@ -0,3 +1,14 @@

var PREFIX = 'ads';
var dict = require('./dictionary.js');
/*
POC of using a lookup table to convert vars to Mendix equivalents
*/
function validateKey(key){
return dict[key] || key;
}
function makeScssVar(name, value) {
return `$${name}: #${value};`;
return `$${PREFIX}-${validateKey(name)}: #${value};`;
}

@@ -4,0 +15,0 @@

Sorry, the diff of this file is not supported yet

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