Socket
Socket
Sign inDemoInstall

punch

Package Overview
Dependencies
107
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.36 to 0.5.38

8

lib/compilers/less.js

@@ -8,6 +8,10 @@ var Less = require("less");

compile: function(input, filename, callback){
compile: function(input, filename, callback) {
var options = { "filename": filename, "paths": [ Path.dirname(filename) ] };
Less.render(input, options, function (err, output) {
return callback(err, output);
var error_msg = null;
if (err) {
error_msg = "Less parsing error: " + err.message;
}
return callback(error_msg, output);
});

@@ -14,0 +18,0 @@ }

@@ -69,2 +69,3 @@ var Path = require("path");

port: 9009,
host: "localhost",
cache: {

@@ -71,0 +72,0 @@ "max_age": 0,

@@ -36,6 +36,6 @@ var Connect = require("connect");

app.listen(self.config.server.port);
app.listen(self.config.server.port, self.config.server.host);
console.log("Started Punch server on port %s", self.config.server.port);
console.log("Running Punch server on %s:%s", self.config.server.host, self.config.server.port);
}
};

@@ -15,3 +15,3 @@ {

],
"version": "0.5.36",
"version": "0.5.38",
"homepage": "https://github.com/laktek/punch",

@@ -37,3 +37,3 @@ "author": "Lakshan Perera <lakshan@web2media.net> (http://laktek.com)",

"knox": ">= 0.8.0",
"less": ">= 1.3.0",
"less": ">= 1.4.1",
"marked": ">= 0.2.5",

@@ -40,0 +40,0 @@ "mime": ">= 1.2.5",

@@ -15,4 +15,4 @@ var Less = require("less");

it("calls the callback with the result", function(){
spyOn(Less, "render").andCallFake(function(input, options, callback){
it("calls the callback with the result", function() {
spyOn(Less, "render").andCallFake(function(input, options, callback) {
return callback(null, "rendered file");

@@ -27,2 +27,13 @@ });

it("calls the callback with the error message when an error occurrs", function() {
spyOn(Less, "render").andCallFake(function(input, options, callback){
return callback({ message: "Some error occurred."}, null);
});
var spyCallback = jasmine.createSpy();
LessCompiler.compile("test", "sample.less", spyCallback);
expect(spyCallback).toHaveBeenCalledWith("Less parsing error: Some error occurred.", null);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc