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

express-freemarker

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-freemarker - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

29

index.js

@@ -30,20 +30,29 @@ // libs/fmpp/bin/fmpp test/template/index.ftl -D "tdd(../data.json)" -o test/index.html

// args = [filename, "-D", "tdd(" + path.join( basedir, dataname) + ")", "-o", path.join(basedir, tname)];
var args = [filename, "-D", data, "-o", tname ];
var args = [filename, "-D", data, "-o", tname ];
var fmpp = spawn(path2fmpp, args, function(err, content){
console.log( content )
if(err) throw err;
})
// fmpp.stdout.on('data', function (data) {
// console.log('stdout: ' + data);
// });
var errorMsg = "";
fmpp.stderr.on('data', function (data) {
callback(data)
// console.log(data.toString(), 'error')
// callback(data.toString())
});
// @TODO FIX.
fmpp.stdout.on('data', function (data) {
errorMsg += data.toString();
// callback(data.toString())
});
fmpp.on('close', function (code) {
if(code !== 0) return;
fs.readFile(tname, 'utf8', function(err, content){
callback(err, content);
fs.unlink(tname);
if(~errorMsg.indexOf(">>> ABORTED! <<<") || code !== 0){
var isError = true;
callback(errorMsg || "uncatched freemarker parse Error occurs in " + filename)
}
fs.exists(tname, function(flag){
if(isError) return fs.unlink(tname, function(){});
fs.readFile(tname, 'utf8', function(err, content){
callback(err, content);
fs.unlink(tname, function(){});
})
})

@@ -50,0 +59,0 @@ });

{
"name": "express-freemarker",
"version": "0.1.0",
"version": "0.1.1",
"description": "",

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

@@ -8,3 +8,2 @@ var fmpp = require("../");

render( path.join(__dirname, 'template/index.ftl'), {
name: 'zhenghaibo',
flowers: [

@@ -15,3 +14,4 @@ ["zhenghaibo", 'hello' ,100],

}, function(err, content){
console.log(content)
if(err) return console.log(err)
else console.log(content)
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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