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

gulp-polish

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-polish - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

4

index.js

@@ -24,3 +24,3 @@ var through = require('through2');

if (!file.isBuffer()) {
if (!file.isBuffer() || file.contents.toString('utf8').length === 0) {
return cb(null, file);

@@ -30,3 +30,3 @@ }

polish(file, rules);
return cb(null, file);

@@ -33,0 +33,0 @@ });

@@ -29,3 +29,3 @@ var through = require('through2'),

_.each(fileErrors, function (error){
var message;
var message;

@@ -63,3 +63,3 @@ if (_.isFunction(error.rule.message)) {

output += table([
output += table([
[

@@ -70,3 +70,3 @@ chalk.gray('line ' + error.data.rule.start.line),

chalk.red(message)
]
]
]);

@@ -92,3 +92,3 @@

return through.obj(function (file, enc, cb) {
if (!file.isBuffer()) {
if (!file.isBuffer() || file.contents.toString('utf8').length === 0) {
return cb(null, file);

@@ -95,0 +95,0 @@ }

@@ -5,3 +5,3 @@ var fs = require('fs');

module.exports = function(file, rules){
module.exports = function getConfig (file, rules){
var configDir = path.join(file.path.replace(process.cwd(),''), '../'),

@@ -46,2 +46,2 @@ filename = path.basename(file.relative, path.extname(file.relative)),

return config;
};
};

@@ -45,5 +45,5 @@ var fs = require('fs');

module.exports = function(file, syntax){
module.exports = function processStylesheet (file, syntax){
var filetype = path.extname(file.path).replace('.','').toLowerCase(),
ast;
output;

@@ -54,3 +54,3 @@ if (!_.contains(['css','scss','sass','less'], filetype)){

ast = {
output = {
name: path.basename(file.path).split('.')[0],

@@ -60,7 +60,7 @@ cssDOM: gonzales.parse(file.contents.toString('utf8'), { syntax: filetype })

ast.cssDOM.traverseByTypes(['multilineComment', 'singlelineComment'], function (comment, index, level, parent){
output.cssDOM.traverseByTypes(['multilineComment', 'singlelineComment'], function (comment, index, level, parent){
readComment(comment, level);
});
return ast;
return output;
};

@@ -37,3 +37,3 @@ var _ = require('lodash');

return errors;
return errors || [];
};

@@ -1,4 +0,4 @@

var getConfig = require('./polish-get-config');
var testFile = require('./polish-test-file');
var processCSS = require('./polish-process-stylesheet');
var getConfig = require('./polish-get-config'),
testFile = require('./polish-test-file'),
processStylesheet = require('./polish-process-stylesheet');

@@ -11,5 +11,5 @@ module.exports = function(file, rules){

var config = getConfig(file, rules),
processedCSS = processCSS(file),
testResults = testFile(file, processedCSS, rules, config);
var config = getConfig(file, rules),
processedStyles = processStylesheet(file),
testResults = testFile(file, processedStyles, rules, config);

@@ -16,0 +16,0 @@ file.polish = {};

{
"name": "gulp-polish",
"version": "2.4.1",
"version": "2.4.2",
"description": "Make your stylesheets perfect. Add an extra coat of polish.",

@@ -5,0 +5,0 @@ "main": "index.js",

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