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 - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

10

CHANGELOG.md

@@ -11,13 +11,17 @@ # Change Log

## [1.3.0]
### Features
- Add support for indented syntax - [@vegetableman](https://github.com/vegetableman)
## [1.2.0]
### Features
- Add support for custom imports
- Add support for custom imports - [@kevin-smets](https://github.com/kevin-smets)
## [1.1.0] - 2015-03-18
### Fixed
- Only strip extension for css, scss, sass files
- Only strip extension for css, scss, sass files - [@nervo](https://github.com/nervo)
## [1.0.4] - 2015-03-03
### Tests
- Added a test for nested imports
- Added a test for nested imports - [@kevin-smets](https://github.com/kevin-smets)

@@ -24,0 +28,0 @@ ## [1.0.3] - 2015-02-02

{
"name": "sass-graph",
"version": "1.2.0",
"version": "1.3.0",
"description": "Parse sass files and extract a graph of imports",

@@ -5,0 +5,0 @@ "license": "MIT",

function parseImports(content) {
var importRe = /\@import ([.\s\S]+?);/g;
var importRe = /\@import ([.\s\S]+?);?$/g;
var depRe = /["'](.+?)["']/g;

@@ -4,0 +4,0 @@ var importMatch = {};

@@ -14,12 +14,22 @@ 'use strict';

// check all load paths
var i, length = loadPaths.length;
var i, length = loadPaths.length, extensions = [".css", ".sass", ".scss"];
for(i = 0; i < length; i++) {
var scssPath = path.normalize(loadPaths[i] + "/" + sassPathName + ".scss");
if (fs.existsSync(scssPath)) {
return scssPath;
var scssPath;
for (var j = 0; j < extensions.length; j++) {
scssPath = path.normalize(loadPaths[i] + "/" + sassPathName + extensions[j]);
if (fs.existsSync(scssPath)) {
return scssPath;
}
}
var partialPath;
// special case for _partials
var partialPath = path.join(path.dirname(scssPath), "_" + path.basename(scssPath));
if (fs.existsSync(partialPath)) {
return partialPath
for (var j = 0; j < extensions.length; j++) {
scssPath = path.normalize(loadPaths[i] + "/" + sassPathName + extensions[j]);
partialPath = path.join(path.dirname(scssPath), "_" + path.basename(scssPath));
if (fs.existsSync(partialPath)) {
return partialPath;
}
}

@@ -39,3 +49,3 @@ }

var graph = this;
_(glob.sync(dir+"/**/*.scss", {})).forEach(function(file) {
_(glob.sync(dir+"/**/*.s[ca]ss", {})).forEach(function(file) {
graph.addFile(path.resolve(file));

@@ -42,0 +52,0 @@ });

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