1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-09-20 19:37:27 +03:00

Edit changelog

This commit is contained in:
Brent Jackson 2018-08-14 21:19:38 -04:00
parent 9ca6df4bfe
commit 690186bfa2
3 changed files with 14 additions and 3 deletions

View File

@ -1,6 +1,12 @@
# Changelog
## v1.6.0 2018-08-14
- Adds `Head` component for setting document head
- Adds screenshot command to create a screenshot of the first slide
- Removes the `--title` option in favor of using the `Head` component
## v1.5.15 2018-08-11
- Adds swipe gesture support for touchscreen devices

View File

@ -6,13 +6,18 @@ module.exports = async (opts) => {
const {
width = 1280,
height = 720,
outFile = 'card.png'
outFile = 'card.png',
sandbox = true
} = opts
const file = path.join(opts.outDir, outFile)
if (!fs.existsSync(opts.outDir)) fs.mkdirSync(opts.outDir)
const browser = await puppeteer.launch()
const browser = await puppeteer.launch({
args: [
!sandbox && '--no-sandbox'
].filter(Boolean)
})
const page = await browser.newPage()
await page.setViewport({ width, height })

View File

@ -13,7 +13,7 @@
"start": "./cli.js docs/index.mdx -p 8989",
"build": "./cli.js build docs/index.mdx -d site",
"pdf": "./cli.js pdf docs/index.mdx -d site",
"screenshot": "./cli.js screenshot docs/index.mdx -d site",
"screenshot": "./cli.js screenshot docs/index.mdx -d site --no-sandbox",
"help": "./cli.js",
"test": "jest"
},