Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

gulp-markdown-pdf

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-markdown-pdf - npm Package Compare versions

Comparing version
8.0.0
to
9.0.0
+9
-29
index.js

@@ -1,31 +0,11 @@

'use strict';
const through = require('through2');
const markdownpdf = require('markdown-pdf');
const PluginError = require('plugin-error');
import {promisify} from 'node:util';
import markdownpdf from 'markdown-pdf';
import {gulpPlugin} from 'gulp-plugin-extras';
module.exports = options => {
return through.obj((file, encoding, callback) => {
if (file.isNull()) {
callback(null, file);
return;
}
if (file.isStream()) {
callback(new PluginError('gulp-markdown-pdf', 'Streaming not supported'));
return;
}
markdownpdf(options)
.from.string(file.contents.toString())
.to.buffer((error, buffer) => {
if (error) {
callback(new PluginError('gulp-markdown-pdf', error, {fileName: file.path}));
return;
}
file.contents = buffer;
file.extname = '.pdf';
callback(null, file);
});
export default function gulpMarkdownPdf(options) {
return gulpPlugin('gulp-markdown-pdf', async file => {
file.contents = await promisify(markdownpdf(options).from.string(file.contents.toString()).to.buffer)();
file.extname = '.pdf';
return file;
});
};
}
{
"name": "gulp-markdown-pdf",
"version": "8.0.0",
"version": "9.0.0",
"description": "Markdown to PDF",
"license": "MIT",
"repository": "sindresorhus/gulp-markdown-pdf",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=8"
"node": ">=18"
},

@@ -34,11 +37,10 @@ "scripts": {

"dependencies": {
"markdown-pdf": "^10.0.0",
"plugin-error": "^1.0.0",
"through2": "^3.0.0"
"gulp-plugin-extras": "^0.2.2",
"markdown-pdf": "^11.0.0"
},
"devDependencies": {
"ava": "^2.4.0",
"p-event": "^4.1.0",
"vinyl": "^2.1.0",
"xo": "^0.25.3"
"ava": "^5.3.1",
"p-event": "^6.0.0",
"vinyl": "^3.0.0",
"xo": "^0.56.0"
},

@@ -45,0 +47,0 @@ "peerDependencies": {

@@ -1,2 +0,2 @@

# gulp-markdown-pdf [![Build Status](https://travis-ci.org/sindresorhus/gulp-markdown-pdf.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-markdown-pdf)
# gulp-markdown-pdf

@@ -7,17 +7,15 @@ > Markdown to PDF with [`markdown-pdf`](https://github.com/alanshaw/markdown-pdf)

## Install
```sh
npm install --save-dev gulp-markdown-pdf
```
$ npm install --save-dev gulp-markdown-pdf
```
## Usage
```js
const gulp = require('gulp');
const markdownPdf = require('gulp-markdown-pdf');
import gulp from 'gulp';
import markdownPdf from 'gulp-markdown-pdf';
exports.default = () => (
export default () => (
gulp.src('intro.md')

@@ -29,3 +27,2 @@ .pipe(markdownPdf())

## API

@@ -32,0 +29,0 @@

Sorry, the diff of this file is not supported yet