cssnano-utils
Advanced tools
Comparing version 1.0.0 to 5.0.0-nightly.0.7.7
@@ -1,2 +0,9 @@ | ||
export default function getArguments(node) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = getArguments; | ||
function getArguments(node) { | ||
return node.nodes.reduce((list, child) => { | ||
@@ -8,4 +15,7 @@ if (child.type !== 'div') { | ||
} | ||
return list; | ||
}, [[]]); | ||
} | ||
} | ||
module.exports = exports.default; |
@@ -1,2 +0,9 @@ | ||
export default function getMatchFactory(map) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = getMatchFactory; | ||
function getMatchFactory(map) { | ||
return function getMatch(args) { | ||
@@ -13,2 +20,4 @@ const match = args.reduce((list, arg, i) => { | ||
}; | ||
} | ||
} | ||
module.exports = exports.default; |
@@ -1,6 +0,39 @@ | ||
import rawCache from './rawCache.js'; | ||
import getMatch from './getMatch.js'; | ||
import getArguments from './getArguments.js'; | ||
import sameParent from './sameParent.js'; | ||
"use strict"; | ||
export { rawCache, getMatch, getArguments, sameParent }; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, "rawCache", { | ||
enumerable: true, | ||
get: function () { | ||
return _rawCache.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "getMatch", { | ||
enumerable: true, | ||
get: function () { | ||
return _getMatch.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "getArguments", { | ||
enumerable: true, | ||
get: function () { | ||
return _getArguments.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, "sameParent", { | ||
enumerable: true, | ||
get: function () { | ||
return _sameParent.default; | ||
} | ||
}); | ||
var _rawCache = _interopRequireDefault(require("./rawCache.js")); | ||
var _getMatch = _interopRequireDefault(require("./getMatch.js")); | ||
var _getArguments = _interopRequireDefault(require("./getArguments.js")); | ||
var _sameParent = _interopRequireDefault(require("./sameParent.js")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
@@ -1,4 +0,11 @@ | ||
import { plugin } from 'postcss'; | ||
"use strict"; | ||
export default plugin('cssnano-util-raw-cache', () => { | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _postcss = require("postcss"); | ||
var _default = (0, _postcss.plugin)('cssnano-util-raw-cache', () => { | ||
return (css, result) => { | ||
@@ -19,2 +26,5 @@ result.root.rawCache = { | ||
}; | ||
}); | ||
}); | ||
exports.default = _default; | ||
module.exports = exports.default; |
@@ -0,1 +1,8 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = sameParent; | ||
/** | ||
@@ -10,5 +17,5 @@ * @param {postcss.ChildNode} nodeA | ||
} | ||
return nodeA.type === nodeB.type; | ||
} | ||
/** | ||
@@ -19,3 +26,5 @@ * @param {postcss.ChildNode} nodeA | ||
*/ | ||
export default function sameParent(nodeA, nodeB) { | ||
function sameParent(nodeA, nodeB) { | ||
if (!nodeA.parent) { | ||
@@ -29,11 +38,13 @@ // A is orphaned, return if B is orphaned as well | ||
return false; | ||
} | ||
} // Check if parents match | ||
// Check if parents match | ||
if (!checkMatch(nodeA.parent, nodeB.parent)) { | ||
return false; | ||
} | ||
} // Check parents' parents | ||
// Check parents' parents | ||
return sameParent(nodeA.parent, nodeB.parent); | ||
} | ||
} | ||
module.exports = exports.default; |
{ | ||
"name": "cssnano-utils", | ||
"version": "1.0.0", | ||
"version": "5.0.0-nightly.0.7.7", | ||
"repository": "cssnano/cssnano", | ||
@@ -8,5 +8,5 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"prebuild": "del-cli dist", | ||
"prebuild": "", | ||
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.js --out-dir dist --ignore \"**/__tests__/\"", | ||
"prepublish": "yarn build" | ||
"prepublish": "" | ||
}, | ||
@@ -18,3 +18,3 @@ "homepage": "https://github.com/cssnano/cssnano", | ||
"engines": { | ||
"node": ">=10.13.0" | ||
"node": ">=6.9.0" | ||
}, | ||
@@ -27,7 +27,3 @@ "files": [ | ||
"postcss": "^7.0.16" | ||
}, | ||
"devDependencies": { | ||
"cross-env": "^7.0.2", | ||
"del-cli": "^3.0.0" | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4807
0
122
1