Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

cssbun

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssbun - npm Package Compare versions

Comparing version
1.2.0
to
1.2.1
+5
test/scenarios/dependencysub/css/subIncluded.css
@import "mithui/css/textInput.css";
body {
background-color: red;
}
@import "./css/subIncluded.css";
.subTest {
background-color: pink;
}
@import "./css/subIncluded.css";
.test {
background-color: blue;
}
@import "./included.css";
body {
background-color: red;
}
+1
-6

@@ -25,9 +25,4 @@ const path = require('path');

const absoluteSubPath = resolve.sync(match[1], {
includeCoreModules: false,
basedir: relativeSubDirectory
});
const subFile = grabFile(match[1], relativeSubDirectory, '', alreadyIncluded);
const subFile = grabFile(match[1], path.dirname(absoluteSubPath), '', alreadyIncluded);
content = content.replace(match[0], subFile);

@@ -34,0 +29,0 @@ }

{
"name": "cssbun",
"version": "1.2.0",
"version": "1.2.1",
"description": "An extremly lightweight bundler than does nothing but bundles your css files using the import syntax.",

@@ -16,5 +16,5 @@ "main": "index.js",

"dependencies": {
"chokidar": "^3.5.2",
"minimist": "^1.2.5",
"resolve": "^1.20.0"
"chokidar": "^3.5.3",
"minimist": "^1.2.7",
"resolve": "^1.22.1"
},

@@ -25,3 +25,3 @@ "directories": {

"devDependencies": {
"basictap": "^1.3.1",
"basictap": "^3.4.3",
"mithui": "^2.0.9"

@@ -28,0 +28,0 @@ },

@@ -36,2 +36,48 @@ const test = require('basictap');

test('bundle file from sub directory', t => {
t.plan(1);
const result = cssmin('./test/scenarios/subdirectory/index.css');
t.equal(result, [
'.subTest {',
' background-color: pink;',
'}',
'',
'.test {',
' background-color: blue;',
'}',
'',
'body {',
' background-color: red;',
'}'
].join('\n'));
});
test('bundle dependency in sub directory', t => {
t.plan(1);
const result = cssmin('./test/scenarios/dependencysub/index.css');
t.equal(result, [
'mui-text-input input:focus {',
' border-color: blue;',
' outline: none;',
'}',
'mui-text-input input {',
' display: block;',
' font-family: arial;',
' font-weight: bold;',
' font-size: 100%;',
' width: 100%;',
' border: 2px solid black;',
' padding: var(--input-padding);',
'}',
'',
'body {',
' background-color: red;',
'}'
].join('\n'));
});
test('bundle from dependency', t => {

@@ -38,0 +84,0 @@ t.plan(1);