Tatiana Inama преди 7 години
родител
ревизия
002303d4d2
променени са 4 файла, в които са добавени 3 реда и са изтрити 5 реда
  1. 1 3
      lib/vademecum.js
  2. 1 1
      package.json
  3. 1 1
      example.js
  4. BIN
      sample.pdf

+ 1 - 3
lib/vademecum.js

@@ -763,9 +763,7 @@ var Category = function Category(categoryName, products) {
     id: mkCategoryTag(categoryName)
   }, dom("tr", null, dom("th", null, dom("h2", {
     className: "category-name"
-  }, categoryName)))), dom("tbody", null, products.filter(function (p) {
-    return p.name !== "R3epair Eye Contour";
-  }).map(function (p, i) {
+  }, categoryName)))), dom("tbody", null, products.map(function (p, i) {
     return dom("tr", null, dom("td", null, Product(p, i)));
   })), dom("tfoot", null, dom("tr", null, dom("td", null, dom("div", {
     class: "footer-space",

+ 1 - 1
package.json

@@ -21,7 +21,7 @@
   "scripts": {
     "start": "./node_modules/.bin/babel js/vademecum.js --watch --out-file lib/vademecum.js",
     "build": "./node_modules/.bin/babel js/vademecum.js --out-dir lib",
-    "pdf": "npm run build && node example.js"
+    "pdf": "npm run build && node pdf-maker.js"
   },
   "repository": {
     "type": "git",

+ 1 - 1
example.js

@@ -6,7 +6,7 @@ const puppeteer = require('puppeteer');
   await page.goto('http://localhost:5500/', {waitUntil: 'networkidle2'});
   //await page.emulateMedia('screen');
   await page.pdf({
-      path: 'sample.pdf',
+      path: 'vademecum-mobile.pdf',
       height: '1450',
     });
     // displayHeaderFooter 

BIN
sample.pdf