Skip to content

Instantly share code, notes, and snippets.

@torufurukawa
Created July 28, 2024 07:56
Show Gist options
  • Save torufurukawa/d456a94b23e8c05a210e1f6ec6a4a5b1 to your computer and use it in GitHub Desktop.
Save torufurukawa/d456a94b23e8c05a210e1f6ec6a4a5b1 to your computer and use it in GitHub Desktop.
md-to-pdf example

README

執筆環境構築

Requirements

  • Node v22.4.1 or later

Setup

npm install

編集のステップ

  1. example.md ファイルを編集する
  2. npm run build を実行する
  3. example.pdf ファイルを開いて確認する

執筆に使うスクリプト

  • npm run build ... PDF ファイルを生成する
  • npm run build:html ... HTML ファイルを生成する
  • npm start ... Markdown の変更を検出し、継続的に HTML ファイルを生成する。 http://localhost:3000 でサーブする。
{
"name": "try-md-to-pdf",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "md-to-pdf example.md",
"build:html": "md-to-pdf --as-html example.md",
"start": "md-to-pdf --watch --port 3000 --as-html example.md"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"md-to-pdf": "^5.2.4"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment