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

postcss-discard-empty

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-discard-empty - npm Package Compare versions

Comparing version 2.1.0 to 4.0.0-rc.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

# 4.0.0-rc.0
* Breaking: Drops support for Node 0.12, we now require at least Node 4.
* Breaking: Update PostCSS to 6.0.0.
# 2.1.0

@@ -2,0 +7,0 @@

27

dist/index.js
'use strict';
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _postcss = require('postcss');
var _postcss2 = _interopRequireDefault(_postcss);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var plugin = 'postcss-discard-empty';
function discardAndReport(css, result) {
function discardEmpty(node) {
var type = node.type;
var sub = node.nodes;
var type = node.type,
sub = node.nodes,
params = node.params;

@@ -17,3 +26,3 @@

if (type === 'decl' && !node.value || type === 'rule' && !node.selector || sub && !sub.length || type === 'atrule' && (!sub && !node.params || !node.params && !sub.length)) {
if (type === 'decl' && !node.value || type === 'rule' && !node.selector || sub && !sub.length || type === 'atrule' && (!sub && !params || !params && !sub.length)) {
node.remove();

@@ -23,4 +32,4 @@

type: 'removal',
plugin: 'postcss-discard-empty',
node: node
plugin,
node
});

@@ -33,7 +42,5 @@ }

exports.default = (0, _postcss.plugin)('postcss-discard-empty', function () {
return function (css, result) {
return discardAndReport(css, result);
};
exports.default = _postcss2.default.plugin(plugin, function () {
return discardAndReport;
});
module.exports = exports['default'];
{
"name": "postcss-discard-empty",
"version": "2.1.0",
"version": "4.0.0-rc.0",
"description": "Discard empty rules and values with PostCSS.",

@@ -11,5 +11,3 @@ "main": "dist/index.js",

"scripts": {
"pretest": "eslint src",
"prepublish": "del-cli dist && babel src --out-dir dist --ignore /__tests__/",
"test": "ava src/__tests__"
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/"
},

@@ -27,17 +25,9 @@ "keywords": [

"dependencies": {
"postcss": "^5.0.14"
"postcss": "^6.0.0"
},
"devDependencies": {
"ava": "^0.14.0",
"babel-cli": "^6.4.5",
"babel-core": "^6.4.5",
"babel-plugin-add-module-exports": "^0.1.2",
"babel-preset-es2015": "^6.3.13",
"babel-preset-es2015-loose": "^7.0.0",
"babel-preset-stage-0": "^6.3.13",
"del-cli": "^0.2.0",
"eslint": "^2.0.0",
"eslint-config-cssnano": "^2.0.0"
"babel-cli": "^6.0.0",
"cross-env": "^3.0.0"
},
"homepage": "https://github.com/ben-eb/postcss-discard-empty",
"homepage": "https://github.com/ben-eb/cssnano",
"author": {

@@ -48,9 +38,9 @@ "name": "Ben Briggs",

},
"repository": "ben-eb/postcss-discard-empty",
"eslintConfig": {
"extends": "cssnano"
"repository": "ben-eb/cssnano",
"bugs": {
"url": "https://github.com/ben-eb/cssnano/issues"
},
"ava": {
"require": "babel-core/register"
"engines": {
"node": ">=4"
}
}

@@ -1,2 +0,2 @@

# [postcss][postcss]-discard-empty [![Build Status](https://travis-ci.org/ben-eb/postcss-discard-empty.svg?branch=master)][ci] [![NPM version](https://badge.fury.io/js/postcss-discard-empty.svg)][npm] [![Dependency Status](https://gemnasium.com/ben-eb/postcss-discard-empty.svg)][deps]
# [postcss][postcss]-discard-empty

@@ -15,3 +15,3 @@ > Discard empty rules and values with PostCSS.

For more examples see the [tests](test.js).
For more examples see the [tests](src/__tests__/index.js).

@@ -39,7 +39,8 @@ ### Input

## Contributing
Pull requests are welcome. If you add functionality, then please add unit tests
to cover it.
## Contributors
See [CONTRIBUTORS.md](https://github.com/ben-eb/cssnano/blob/master/CONTRIBUTORS.md).
## License

@@ -49,5 +50,3 @@

[ci]: https://travis-ci.org/ben-eb/postcss-discard-empty
[deps]: https://gemnasium.com/ben-eb/postcss-discard-empty
[npm]: http://badge.fury.io/js/postcss-discard-empty
[postcss]: https://github.com/postcss/postcss
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