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

letter-press

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

letter-press - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

26

index.js

@@ -13,5 +13,8 @@ const fs = require('fs')

async function press (id, md, dist) {
const mdPath = path.join(dist, id + '.md')
const htmlPath = path.join(dist, id + '.html')
const pdfPath = path.join(dist, id + '.pdf')
const mdName = id + '.md'
const htmlName = id + '.html'
const pdfName = id + '.pdf'
const mdPath = path.join(dist, mdName)
const htmlPath = path.join(dist, htmlName)
const pdfPath = path.join(dist, pdfName)

@@ -21,15 +24,16 @@ try {

write(mdPath, md)
.then(file => console.log('File written: ' + file))
.catch(console.error)
.then(file => console.log('✨ ' + mdName + ' done'))
.catch(e => console.error('🚨 ' + e))
// write html
const html = await ghmd(id, md).catch(e => console.error(e))
const html = await ghmd(id, md)
.catch(e => console.error('🚨 ' + e))
await write(htmlPath, html)
.then(file => console.log('File written: ' + file))
.catch(console.error)
.then(file => console.log('✨ ' + htmlName + ' done'))
.catch(e => console.error('🚨 ' + e))
// write pdf
pdf(htmlPath, pdfPath)
.then(file => console.log('File written: ' + file))
.catch(console.error)
.then(file => console.log('✨ ' + pdfName + ' done'))
.catch(e => console.error('🚨 ' + e))
} catch (e) {

@@ -56,3 +60,3 @@ throw e

if (browser && browser.close) {
console.error('Error: Problem printing PDF. Closing browser...')
console.error('🚨 Error: Problem printing PDF. Closing browser...')
browser.close()

@@ -59,0 +63,0 @@ }

{
"name": "letter-press",
"version": "1.1.4",
"version": "1.1.5",
"main": "index.js",

@@ -5,0 +5,0 @@ "scripts": {

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