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

cssnano

Package Overview
Dependencies
Maintainers
8
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssnano - npm Package Compare versions

Comparing version 5.0.13 to 5.0.14

25

dist/index.js

@@ -16,4 +16,2 @@ "use strict";

var _isResolvable = _interopRequireDefault(require("is-resolvable"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -23,2 +21,16 @@

/*
* @param {string} moduleId
* @returns {boolean}
*/
function isResolvable(moduleId) {
try {
require.resolve(moduleId);
return true;
} catch (e) {
return false;
}
}
/*
* preset can be one of four possibilities:

@@ -31,2 +43,3 @@ * preset = 'default'

function resolvePreset(preset) {

@@ -59,3 +72,3 @@ let fn, options;

if ((0, _isResolvable.default)(fn)) {
if (isResolvable(fn)) {
return require(fn)(options).plugins;

@@ -66,3 +79,3 @@ }

if ((0, _isResolvable.default)(sugar)) {
if (isResolvable(sugar)) {
return require(sugar)(options).plugins;

@@ -122,3 +135,3 @@ } // If all else fails, we probably have a typo in the config somewhere

if (typeof pluginDef === 'string' && (0, _isResolvable.default)(pluginDef)) {
if (typeof pluginDef === 'string' && isResolvable(pluginDef)) {
options.preset.plugins.push([require(pluginDef), opts]);

@@ -128,3 +141,3 @@ } else {

}
} else if (typeof plugin === 'string' && (0, _isResolvable.default)(plugin)) {
} else if (typeof plugin === 'string' && isResolvable(plugin)) {
options.preset.plugins.push([require(plugin), {}]);

@@ -131,0 +144,0 @@ } else {

{
"name": "cssnano",
"version": "5.0.13",
"description": "A modular minifier, built on top of the PostCSS ecosystem.",
"main": "dist/index.js",
"scripts": {
"bundle-size": "webpack --json --config src/__tests__/_webpack.config.js | webpack-bundle-size-analyzer",
"prebuild": "rimraf dist",
"build": "babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
"prepare": "yarn build"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/cssnano"
},
"keywords": [
"css",
"compress",
"minify",
"optimise",
"optimisation",
"postcss",
"postcss-plugin"
],
"license": "MIT",
"dependencies": {
"cssnano-preset-default": "^5.1.9",
"is-resolvable": "^1.1.0",
"lilconfig": "^2.0.3",
"yaml": "^1.10.2"
},
"homepage": "https://github.com/cssnano/cssnano",
"author": {
"name": "Ben Briggs",
"email": "beneb.info@gmail.com",
"url": "http://beneb.info"
},
"repository": "cssnano/cssnano",
"files": [
"dist",
"LICENSE-MIT",
"quickstart.js"
],
"tonicExampleFilename": "quickstart.js",
"bugs": {
"url": "https://github.com/cssnano/cssnano/issues"
},
"engines": {
"node": "^10 || ^12 || >=14.0"
},
"devDependencies": {
"autoprefixer": "^10.3.7",
"cssnano-preset-advanced": "^5.1.9",
"cssnano-preset-lite": "^2.0.1",
"postcss": "^8.2.15"
},
"peerDependencies": {
"postcss": "^8.2.15"
}
}
"name": "cssnano",
"version": "5.0.14",
"description": "A modular minifier, built on top of the PostCSS ecosystem.",
"main": "dist/index.js",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/cssnano"
},
"keywords": [
"css",
"compress",
"minify",
"optimise",
"optimisation",
"postcss",
"postcss-plugin"
],
"license": "MIT",
"dependencies": {
"cssnano-preset-default": "^5.1.9",
"lilconfig": "^2.0.3",
"yaml": "^1.10.2"
},
"homepage": "https://github.com/cssnano/cssnano",
"author": {
"name": "Ben Briggs",
"email": "beneb.info@gmail.com",
"url": "http://beneb.info"
},
"repository": "cssnano/cssnano",
"files": [
"dist",
"LICENSE-MIT",
"quickstart.js"
],
"tonicExampleFilename": "quickstart.js",
"bugs": {
"url": "https://github.com/cssnano/cssnano/issues"
},
"engines": {
"node": "^10 || ^12 || >=14.0"
},
"devDependencies": {
"autoprefixer": "^10.3.7",
"cssnano-preset-advanced": "^5.1.9",
"cssnano-preset-lite": "^2.0.1",
"postcss": "^8.2.15"
},
"peerDependencies": {
"postcss": "^8.2.15"
},
"scripts": {
"bundle-size": "webpack --json --config src/__tests__/_webpack.config.js | webpack-bundle-size-analyzer",
"prebuild": "rimraf dist",
"build": "babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\""
},
"readme": "# cssnano\n\nFor documentation, please see the following links:\n\n* Repository: https://github.com/cssnano/cssnano\n* Website: http://cssnano.co\n"
}
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