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.0.3 to 1.1.0

test/fixtures/components/k.l.scss

4

CHANGELOG.md
# Change Log
All notable changes to this project will be documented in this file.
## [1.0.4] - 2015-03-03
### Tests
- Added a test for nested imports
## [1.0.3] - 2015-02-02

@@ -5,0 +9,0 @@ ### Fixed

4

package.json
{
"name": "sass-graph",
"version": "1.0.3",
"version": "1.1.0",
"description": "Parse sass files and extract a graph of imports",

@@ -13,3 +13,3 @@ "license": "MIT",

"scripts": {
"test": "mocha ./test/test.js"
"test": "mocha ./test/test*.js"
},

@@ -16,0 +16,0 @@ "keywords": [

@@ -54,2 +54,11 @@ # Sass Graph

## Running Mocha tests
You can run the tests by executing the following commands:
```
npm install
npm test
```
## Authors

@@ -56,0 +65,0 @@

@@ -11,4 +11,4 @@ 'use strict';

function resolveSassPath(sassPath, loadPaths) {
// trim any file extensions
var sassPathName = sassPath.replace(/\.\w+$/, '');
// trim sass file extensions
var sassPathName = sassPath.replace(/\.(css|s[ca]ss)$/, '');
// check all load paths

@@ -15,0 +15,0 @@ var i, length = loadPaths.length;

@@ -12,3 +12,8 @@

'_e.scss': fixtures + "/components/_e.scss",
'f.scss': fixtures + "/f.scss"
'f.scss': fixtures + "/f.scss",
'g.scss': fixtures + "/g.scss",
'_h.scss': fixtures + "/nested/_h.scss",
'_i.scss': fixtures + "/nested/_i.scss",
'j.scss': fixtures + "/j.scss",
'k.l.scss': fixtures + "/components/k.l.scss"
}

@@ -34,2 +39,12 @@

it('should have the correct (nested) imports for g.scss', function() {
var expectedDescendents = [files['_h.scss'], files['_i.scss']];
var descendents = [];
graph.visitDescendents(files['g.scss'], function (imp) {
descendents.push(imp);
assert.notEqual(expectedDescendents.indexOf(imp), -1);
});
});
it('should traverse ancestors of _c.scss', function() {

@@ -36,0 +51,0 @@ ancestors = [];

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