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

compose-new

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compose-new - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

19

lib/compose-new.js

@@ -18,7 +18,9 @@ var Transform = require('stream').Transform

util.inherits(ComposeNew, Transform);
function ComposeNew(dataJSONFilePath, options) {
function ComposeNew(data, filePath, options) {
options = options || {};
this.buffer = new Buffer(INCLUDES.join('\n'))
var dataFile = dataJSONFilePath || '/public/data.json';
this.dataJSONFilePath = path.join(process.cwd(), dataFile);
this.data = data;
this.filePath = filePath || process.cwd();
var dataFile = '/public/data.json';
this.dataJSONFilePath = path.join(this.filePath, dataFile);
Transform.call(this, options);

@@ -38,8 +40,7 @@ }

, basedir: '/'
, filename: process.cwd() + '/src/foo'
, filename: self.filePath + '/src/foo'
, data: {}
}
, stylesheetUrl = process.cwd() + '/public/styles/screen.css'
, stylesheetUrl = self.filePath + '/public/styles/screen.css'
;
var handleCssInline = function(err, result) {

@@ -55,3 +56,2 @@ if (err)

return done(err);
fs.readFile(stylesheetUrl, function(err, screenCss) {

@@ -69,2 +69,7 @@ if (err)

};
if (self.data) {
jadeOptions.data = self.data;
return jade.render(source, jadeOptions, handleJadeRender);
}
fs.readFile(this.dataJSONFilePath, function(err, data) {

@@ -71,0 +76,0 @@ // `err` no 'data.json', that's okay. its not required.

{
"name": "compose-new",
"version": "0.0.2",
"version": "0.0.3",
"description": "Command line tools for rapid email development",

@@ -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