Skip to content

resource-sentry/reader-scss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reader: SCSS

Extracts all variables from the provided .scss file. This plugin does not perform recursive walk, but it works with a single file.

Supports: color, dimension, operation, text, simple value and variable variables.

Version Dependencies

Installation

yarn add --dev @resource-sentry/reader-scss

Configuration

  • entry, path to SCSS file.

Example

$prf-value-one-hundred: 100;
$breakpoint: 768px;
$rhythm: 4px;
$padding-s: 2*$rhythm;

SCSS variables will be compiled into rs.js file ready for use in production code.

import Rs from './rs';

Rs.getResource(Rs.Value.PRF_VALUE_ONE_HUNDRED); // Return 100
Rs.getResource(Rs.Dimension.BREAKPOINT); // Return 768
Rs.getResource(Rs.Dimension.RHYTHM); // Return 4
Rs.getResource(Rs.Dimension.PADDING_S); // Return 8

About

Resource Sentry SCSS Reader.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published