
Security News
Deno 2.4 Brings Back deno bundle, Improves Dependency Management and Observability
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
less-variable-resolver
Advanced tools
Resolve variables defined by other variables' values - to allow for conversion into languages not supporting lazy evaluation
Resolve variables defined by other variables' values - to allow for conversion into languages not supporting lazy evaluation.
This was developed to be able to use variables declared in a less file inside of SCSS after conversion (e.g. through sast). Take a look at the test cases to better understand the implications and side effects.
const gonzales = require( 'gonzales-pe' ),
lessVariableResolver = require( 'less-variable-resolver' ),
sast = require( 'sast' );
// build AST from less
const lessTree = gonzales.parse(
fs.readFileSync( '_my_variables.less', 'utf8' ),
{ syntax: 'less' },
);
// resolve variables
lessVariableResolver.resolveVariablesInTree( lessTree );
// convert less to scss
const scssTree = sast.parse( lessTree.toString(), { syntax: 'less' } );
console.log( sast.stringify( scssTree ) ); // SCSS variables
The following examples use docker
and docker-compose
to ease creating a level playing field for development but are not essential to this project.
# ensure the node user uses your user id, so you own created files
docker-compose build --build-arg UID=$(id -u) --build-arg GID=$(id -g) node
docker-compose run --rm node npm install
docker-compose run --rm node npm test
FAQs
Resolve variables defined by other variables' values - to allow for conversion into languages not supporting lazy evaluation
The npm package less-variable-resolver receives a total of 68 weekly downloads. As such, less-variable-resolver popularity was classified as not popular.
We found that less-variable-resolver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.