New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

css-path-loader

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-path-loader - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

12

index.js
module.exports = function (source, map) {
this.cacheable && this.cacheable()
var namespace = this.resourcePath.replace(/[\W\w]+(?=src\b)/, '').replace(/\.(scss|less)/, '')
var namespace = this.resourcePath.replace(process.cwd() + '/', '').replace(/\.(less|scss)/, '')
var nameArray = namespace.split('/')
nameArray.pop()
namespace = nameArray.join('-')
var filename = this.resourcePath.split('/').pop()
var nameStr = namespace.split('/').join('-')
// 豁免全局样式
if (namespace !== 'src') {
source = '.' + namespace + '{' + source + '}'
if (nameStr !== filename) {
source = '.' + nameStr + '{' + source + '}'
}

@@ -13,0 +13,0 @@

@@ -5,3 +5,3 @@ {

"css-path-loader",
"/private/tmp"
"/private/tmp/test"
]

@@ -30,3 +30,3 @@ ],

"_requiredBy": [
"#USER"
"/"
],

@@ -36,3 +36,3 @@ "_shasum": "fe629c0f079acbfe90a32eb053b8e3c0a062830a",

"_spec": "css-path-loader",
"_where": "/private/tmp",
"_where": "/private/tmp/test",
"author": {

@@ -76,3 +76,3 @@ "name": "ascoder"

},
"version": "0.1.2"
"version": "0.1.3"
}
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