Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomfreudenberg/gatsby-build-demo-melted
This is a sample for a discussion to gatsby team at https://github.com/gatsbyjs/gatsby/issues/12412
https://github.com/tomfreudenberg/gatsby-build-demo-melted
Last synced: about 2 months ago
JSON representation
This is a sample for a discussion to gatsby team at https://github.com/gatsbyjs/gatsby/issues/12412
- Host: GitHub
- URL: https://github.com/tomfreudenberg/gatsby-build-demo-melted
- Owner: TomFreudenberg
- Created: 2019-03-09T20:14:55.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-07T18:35:07.000Z (over 5 years ago)
- Last Synced: 2024-10-27T23:44:44.515Z (3 months ago)
- Language: JavaScript
- Size: 35.4 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Steps how the demo was created
``` bash
mkdir gatsby-build-demo-melted
cd gatsby-build-demo-meltednpx gatsby new pdf_docs https://github.com/gatsbyjs/gatsby-starter-hello-world
npx gatsby new pdf_app https://github.com/gatsbyjs/gatsby-starter-hello-world
```# Steps to reproduce the demo from repository
``` bash
git clone https://github.com/TomFreudenberg/gatsby-build-demo-melted
cd gatsby-build-demo-melted
```### create the app by just one build
``` bash
cd pdf_melted_app
npm install
npm run build
npm run serve
```Now it is possible to get the PDF from http://localhost:9000/ as with splitted example
# Question
## How to meld all in one project and one build process?
The build process must combine the 4 steps
1. run build (but only pdf_*.js pages)
2. run puppeteer-to-pdf.js for all pdf_*/index.html and store the PDF into src path
3. remove public completely
4. run build (but this time without pdf_*.js)Something like that could be an option.