This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const puppeteer = require('puppeteer'); | |
// Build paths | |
const { buildPathHtml, buildPathPdf } = require('./buildPaths'); | |
const printPdf = async () => { | |
console.log('Starting: Generating PDF Process, Kindly wait ..'); | |
/** Launch a headleass browser */ | |
const browser = await puppeteer.launch(); | |
/* 1- Ccreate a newPage() object. It is created in default browser context. */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
// JSON data | |
const data = require('./data.json'); | |
// Build paths | |
const { buildPathHtml } = require('./buildPaths'); | |
/** | |
* Take an object which has the following model | |
* @param {Object} item | |
* @model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"invoiceId": 1, | |
"createdDate": "3/27/2018", | |
"dueDate": "5/24/2019", | |
"address": "28058 Hazelcrest Center", | |
"companyName": "Eayo", | |
"invoiceName": "Carbonated Water - Peach", | |
"price": 376 | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable*/ | |
const merge = require('webpack-merge'); | |
const baseConfig = require('./base.config'); | |
const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); | |
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | |
const WebpackVisualizer = require('webpack-visualizer-plugin'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const productionConfig = env => { | |
return merge([ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'docs/src/modules/components/bootstrap'; | |
// --- Post bootstrap ----- | |
import React from 'react'; | |
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; | |
const req = require.context('markdown', true, /.md$/); | |
/* | |
APPRAOCH #1 DOES NOT WORK! HANGS SYSTEM |