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.1 to 0.0.2

files/default.css

60

index.js

@@ -1,39 +0,33 @@

var jade = require('jade')
, INCLUDES = [
'include ' + require('jade-email-doc').filepath
, 'include ' + require('jade-email-body').filepath
, 'include ' + require('jade-email-section').filepath
, 'include ' + require('jade-bulletproof-button').filepath
, '' // leave last index empty for final `\n`
]
, options = {
pretty: true
, basedir: '/'
}
, buffer = new Buffer(INCLUDES.join('\n'))
var ComposeNew = require('./lib/compose-new')
, server = require('./lib/server')
, mkdir = require('./lib/mkdir')
, build = require('./lib/build')
, program = require('commander')
, package = require('./package.json')
;
var mkdir = function mkdir() {
console.error('directory mgmt not yet implemented!');
}
if (require.main !== module)
return module.exports = ComposeNew;
var render = function render() {
var init = function init() {
var source = buffer.toString();
process.stdout.write(jade.render(source, options));
};
program
.version(package.version)
.option('-s, --server', 'start the server')
.option('-d, --data [string]', 'specific data.json file for rendering, defaults to public/data.json')
.option('-c, --create', 'create new `dev` directory at cwd')
.option('-b, --build', 'build all `jade` files in /src dir and place into /build')
.parse(process.argv)
;
process.stdin
.on('readable', function() {
while (chunk = this.read())
buffer = Buffer.concat([buffer, chunk]);
})
.on('finish', init)
;
}
if (program.server)
return server.init(program.data);
if (process.argv[2])
mkdir();
else
render();
if (program.create)
return mkdir.init();
if (program.build)
return build.init(program.data);
process.stdin
.pipe(new ComposeNew(program.data))
.pipe(process.stdout)
;
{
"name": "compose-new",
"version": "0.0.1",
"version": "0.0.2",
"description": "Command line tools for rapid email development",

@@ -21,3 +21,3 @@ "main": "index.js",

],
"bin" : "./index.js",
"bin": "./index.js",
"bugs": {

@@ -28,4 +28,6 @@ "url": "https://github.com/tbuchok/compose-new/issues"

"dependencies": {
"jade": "~1.1.5"
"jade": "~1.1.5",
"juice": "~0.4.0",
"commander": "~2.1.0"
}
}
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