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

bake

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bake - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

22

bake.js

@@ -22,4 +22,5 @@ var fs = require("fs"),

// Set values for `bakeDir` and `tplDir`
var bakeDir = conf.directories.bake || "pub",
// Set values for `inputDir`, `outputDir` and `tplDir`
var inputDir = conf.directories.input || "pub",
outputDir = conf.directories.output || "pub",
tplDir = conf.directories.templates || "tpl";

@@ -33,6 +34,6 @@

// Status log
console.log("Beginning to bake " + bakeDir + ".\n");
console.log("Beginning to bake " + inputDir + ".\n");
// Dive into the public directory
dive(bakeDir, function(err, master) {
dive(inputDir, function(err, master) {
// Throw errors

@@ -98,6 +99,11 @@ if (err) throw err;

// Result's filename
var resName = master.replace(fileExtPattern,
"." + fileExt[masterExt]);
if (prop._id == undefined)
prop._id = master.replace(fileExtPattern,
"." + fileExt[masterExt]);
prop._id = resName.replace(inputDir, "");
// Add output dir
resName = outputDir + prop._id;
// Render ejs-template

@@ -107,3 +113,3 @@ result = ejs.render(result, { locals: prop });

// Write contents
fs.writeFile(prop._id, result, function(err) {
fs.writeFile(resName, result, function(err) {
// Throw errors

@@ -117,3 +123,3 @@ if (err) throw err;

// Log status on success
console.log(" " + prop._id + " written.\n");
console.log(" " + resName + " written.\n");

@@ -120,0 +126,0 @@ // When file counter is zero

@@ -5,3 +5,3 @@ {

"tags": [ "ejs", "template" ],
"version": "0.5.1",
"version": "0.5.2",
"author": "Paul Vorbach <paul@vorb.de> (http://vorb.de)",

@@ -8,0 +8,0 @@ "repository": {

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