1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-26 00:35:02 +03:00

Add export script

This commit is contained in:
Brent Jackson 2019-04-20 19:03:49 -04:00
parent 69fdde8000
commit 2259a9d270
3 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@
"build": "yarn workspace @mdx-deck/docs build",
"start-theme": "yarn workspace @mdx-deck/gatsby-theme start",
"build-theme": "yarn workspace @mdx-deck/gatsby-theme build",
"export": "yarn workspace @mdx-deck/export pdf",
"test": "jest"
},
"devDependencies": {

View File

@ -23,7 +23,8 @@ module.exports = async opts => {
switch (type) {
case 'pdf':
await page.goto(`http://localhost:${port}/print`, {
const url = `http://localhost:${port}/print`
await page.goto(url, {
waitUntil: 'networkidle2',
})
await page.pdf({

View File

@ -8,8 +8,8 @@
"mdx-deck-export": "./cli.js"
},
"scripts": {
"pdf": "./cli.js pdf ../../docs/demo.mdx",
"png": "./cli.js png ../../docs/demo.mdx"
"pdf": "./cli.js pdf ../../docs/demo.mdx -d ../../docs/dist",
"png": "./cli.js png ../../docs/demo.mdx -d ../../docs/dist"
},
"dependencies": {
"mdx-deck": "^2.2.3",