New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-uncss

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-uncss - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

65

gatsby-node.js

@@ -93,3 +93,3 @@ exports["onPostBuild"] =

var _fs = __webpack_require__(6);
var _fs = __webpack_require__(5);

@@ -118,13 +118,13 @@ var readFile = exports.readFile = (0, _bluebird.promisify)(_fs.readFile);

var _stripCssComments = __webpack_require__(5);
var _fsAsync = __webpack_require__(2);
var _stripCssComments2 = _interopRequireDefault(_stripCssComments);
var _sanitizeCSS = __webpack_require__(6);
var _fsAsync = __webpack_require__(2);
var _sanitizeCSS2 = _interopRequireDefault(_sanitizeCSS);
var _getPathsWithExt = __webpack_require__(7);
var _getPathsWithExt = __webpack_require__(8);
var _getPathsWithExt2 = _interopRequireDefault(_getPathsWithExt);
var _replaceInFileFactory = __webpack_require__(10);
var _replaceInFileFactory = __webpack_require__(11);

@@ -143,3 +143,3 @@ var _replaceInFileFactory2 = _interopRequireDefault(_replaceInFileFactory);

var rootPath, htmlFiles, _ref3, _ref4, cssFile, originalCSS, _purifiedCSS, purifiedCSS, replaceCSS, htmlFileUpdates;
var rootPath, htmlFiles, _ref3, _ref4, cssFile, _originalCSS, _purifiedCSS, originalCSS, purifiedCSS, replaceCSS, htmlFileUpdates;

@@ -170,6 +170,6 @@ return regeneratorRuntime.wrap(function _callee$(_context) {

case 11:
originalCSS = _context.sent;
_originalCSS = _context.sent;
_context.next = 14;
return uncssAsync(htmlFiles, _extends({}, uncssOptions, {
raw: originalCSS,
raw: _originalCSS,
htmlroot: rootPath

@@ -181,4 +181,6 @@ }));

// remove comments and newlines
purifiedCSS = (0, _stripCssComments2.default)(_purifiedCSS, { preserve: false }).replace(/\n/g, '');
originalCSS = (0, _sanitizeCSS2.default)(_originalCSS);
purifiedCSS = (0, _sanitizeCSS2.default)(_purifiedCSS);

@@ -189,9 +191,9 @@ // replace CSS in files

htmlFileUpdates = htmlFiles.map(replaceCSS);
_context.next = 20;
_context.next = 21;
return (0, _bluebird.all)(htmlFileUpdates);
case 20:
case 21:
return _context.abrupt('return', cb());
case 21:
case 22:
case 'end':

@@ -219,12 +221,33 @@ return _context.stop();

module.exports = require("strip-css-comments");
module.exports = require("fs");
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _stripCssComments = __webpack_require__(7);
var _stripCssComments2 = _interopRequireDefault(_stripCssComments);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (css) {
return (0, _stripCssComments2.default)(css, { preserve: false }).replace(/\n/g, '');
};
/***/ }),
/* 7 */
/***/ (function(module, exports) {
module.exports = require("fs");
module.exports = require("strip-css-comments");
/***/ }),
/* 7 */
/* 8 */
/***/ (function(module, exports, __webpack_require__) {

@@ -239,3 +262,3 @@

var _klaw = __webpack_require__(8);
var _klaw = __webpack_require__(9);

@@ -246,3 +269,3 @@ var _klaw2 = _interopRequireDefault(_klaw);

var _through2Filter = __webpack_require__(9);
var _through2Filter = __webpack_require__(10);

@@ -273,3 +296,3 @@ var _through2Filter2 = _interopRequireDefault(_through2Filter);

/***/ }),
/* 8 */
/* 9 */
/***/ (function(module, exports) {

@@ -280,3 +303,3 @@

/***/ }),
/* 9 */
/* 10 */
/***/ (function(module, exports) {

@@ -287,3 +310,3 @@

/***/ }),
/* 10 */
/* 11 */
/***/ (function(module, exports, __webpack_require__) {

@@ -290,0 +313,0 @@

{
"name": "gatsby-plugin-uncss",
"version": "0.1.3",
"version": "0.1.4",
"description": "Gatsby plugin for removing unused CSS in production.",

@@ -5,0 +5,0 @@ "keywords": [

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