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:
parent
69fdde8000
commit
2259a9d270
@ -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": {
|
||||
|
@ -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({
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user