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

stylecow-plugin-import

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylecow-plugin-import - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

tests/cases/subdirectories/4.css

15

index.js

@@ -12,16 +12,17 @@ var url = require('url');

fn: function (atrule) {
var file = atrule.getData('file');
var importUrl = atrule.get('String').name;
if (!file) {
//is absolute?
if (url.parse(importUrl).hostname || (importUrl[0] === '/')) {
return;
}
var importUrl = atrule.get('String').name;
//get the root file
var rootFile = atrule.getParent('Root').getData('file');
//is absolute?
if (url.parse(importUrl).hostname || (importUrl[0] === '/')) {
if (!rootFile) {
return;
}
file = path.join(path.dirname(file), importUrl);
var file = path.join(path.dirname(rootFile), importUrl);

@@ -53,3 +54,3 @@ //prevent infinite recursion

string.name = relative + '/' + src;
string.name = path.join(relative, src);
});

@@ -56,0 +57,0 @@

{
"name": "stylecow-plugin-import",
"description": "Stylecow plugin to include the @import css files with relative paths in the main css file",
"version": "4.0.0",
"version": "4.0.1",
"author": "Oscar Otero <oom@oscarotero.com>",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/stylecow/stylecow-plugin-import",

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