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

sass-graph

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass-graph

Parse sass files and extract a graph of imports

  • 4.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1M
decreased by-19.7%
Maintainers
2
Weekly downloads
 
Created

What is sass-graph?

The sass-graph npm package is a utility that helps in analyzing the dependencies of Sass files in a project. It parses Sass files to find all the `@import` statements and constructs a graph of the relationships between files. This is particularly useful for understanding and managing complex stylesheets structures in large projects.

What are sass-graph's main functionalities?

Parsing a directory of Sass files

This feature allows you to parse an entire directory of Sass files to create a graph representing the dependencies between them.

const sassGraph = require('sass-graph');
const graph = sassGraph.parseDir('path/to/sass/files');

Finding dependencies of a single Sass file

This feature is used to find all the files that depend on a single Sass file, which can be useful for understanding the impact of changes to that file.

const sassGraph = require('sass-graph');
const graph = sassGraph.parseFile('path/to/sass/file.scss', options);
const dependencies = graph.index['path/to/sass/file.scss'].importedBy;

Watching a directory of Sass files for changes

This feature sets up a watcher on a directory of Sass files and triggers a callback with the changed files when a change is detected.

const sassGraph = require('sass-graph');
const graph = sassGraph.parseDir('path/to/sass/files');
sassGraph.watch('path/to/sass/files', options, (changedFiles) => {
  console.log('Files changed:', changedFiles);
});

Other packages similar to sass-graph

Keywords

FAQs

Package last updated on 01 Sep 2022

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