🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

parcel-plugin-css-object

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcel-plugin-css-object - npm Package Compare versions

Comparing version

to
1.0.1

README.md

10

cssObject.js

@@ -11,4 +11,3 @@ const { Asset } = require("parcel-bundler");

parse(source) {
console.log(source);
var parsedStylesheet = css.parse(source).stylesheet;
var parsedStylesheet = css.parse(source);
this.code =

@@ -20,3 +19,3 @@ parsedStylesheet &&

// Send to JS bundler
return { js: `module.exports = \`${JSON.stringify(this.code)}\`` };
return { js: `module.exports = '${JSON.stringify(this.code)}'` };
}

@@ -27,7 +26,2 @@ }

// Parse the contents of the CSS file and get the resulting AST
function getParsedStylesheet(source) {
return css.parse(source).stylesheet;
}
// Return `true` for an AST node with { type: 'rule' } and valid selectors

@@ -34,0 +28,0 @@ function isValidRule(rule) {

2

package.json
{
"name": "parcel-plugin-css-object",
"version": "1.0.0",
"version": "1.0.1",
"main": "index.js",

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