Skip to content

Commit

Permalink
Merge branch 'feat/windows-0.90'
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer Smith committed Jul 16, 2020
2 parents 6d307dc + 3fb542f commit 9089278
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 17 deletions.
26 changes: 17 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ language: node_js

cache: yarn

dist: bionic

git:
quiet: true

node_js:
- 'lts/*'
- 'node'
Expand All @@ -22,21 +27,24 @@ branches:
- /^v\d*\.\d*\.\d*$/
- /^dependabot/.*$/

script: echo "Running tests against $(node -v)..."
script: echo "Running tests against $(node -v)..." && yarn test

jobs:
include:
- stage: Produce Coverage
- stage: test
name: produce coverage
node_js: lts/*
os: windows
script: jest --coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
- stage: NPM release
- stage: deploy
name: NPM release
node_js: lts/*
os: linux
script: skip
deploy:
provider: npm
email: devfrazs@outlook.com
api_key:
secure: nqrKpbaiRCy6XvkFQFWnx50PQ51CSvZN+u+Je7SZS9qKQproXTgdfrrui+jHuasuWJzJsKzbTy2Q+WglDvYxpS/O5kyHV2MiDj/4+wEMNUNZZRpbiBOPBvp5Y8laCC6OP+sWGPBTEhyNSvEvT9O27CgQRv/cilZRrYfNPEjNWyZ65srXAHHAu8DdX0kJpnVHlSitqUgrx5pEo/DUV3S7mAfSDueRlvbcM/bgzPAsmochKmN5rFD7rSRfTRGPLa0wZ073tz2RkS/21DlRNCfeqZKleq4kUf8ZhJQx2yi/OdE4rUVeT8pyCxFSDQJ63G6kIdyl5nCqaueiBHiV/xSseQBi6yhC67q1jFjeM6bJMdUYESkiK0T3L8QMbE5p2iK3EkC9A423R5QCXM7B/5Pjc2P8Mf934VJVx40Nl78wxPEteYf1CJcyfkDPGJ8Wbw2C2w7V0NVw7gceYnd9T1MlG9qZOi9ksfv1VD6O060SZZnD1iYc1v82lEfHcTBq+XVax/RjmVgrd6HKipV6oJa1TEpC82FwQWFS2XtNewi7UlvFEnQHmVTrm3nPGoMUS9p1AeFH61QPSl90ijmIKYme9z+zQ9g4/S7kmmE2Ozhet6r4eWtwlmIZ6PGo/k32Z/kHAMHgslokpc8OCuGhKIcxUZ23FkM43Ef6Ow7Hy/GspS4=
on:
tags: true
provider: npm
email: devfrazs@outlook.com
api_token:
secure: nqrKpbaiRCy6XvkFQFWnx50PQ51CSvZN+u+Je7SZS9qKQproXTgdfrrui+jHuasuWJzJsKzbTy2Q+WglDvYxpS/O5kyHV2MiDj/4+wEMNUNZZRpbiBOPBvp5Y8laCC6OP+sWGPBTEhyNSvEvT9O27CgQRv/cilZRrYfNPEjNWyZ65srXAHHAu8DdX0kJpnVHlSitqUgrx5pEo/DUV3S7mAfSDueRlvbcM/bgzPAsmochKmN5rFD7rSRfTRGPLa0wZ073tz2RkS/21DlRNCfeqZKleq4kUf8ZhJQx2yi/OdE4rUVeT8pyCxFSDQJ63G6kIdyl5nCqaueiBHiV/xSseQBi6yhC67q1jFjeM6bJMdUYESkiK0T3L8QMbE5p2iK3EkC9A423R5QCXM7B/5Pjc2P8Mf934VJVx40Nl78wxPEteYf1CJcyfkDPGJ8Wbw2C2w7V0NVw7gceYnd9T1MlG9qZOi9ksfv1VD6O060SZZnD1iYc1v82lEfHcTBq+XVax/RjmVgrd6HKipV6oJa1TEpC82FwQWFS2XtNewi7UlvFEnQHmVTrm3nPGoMUS9p1AeFH61QPSl90ijmIKYme9z+zQ9g4/S7kmmE2Ozhet6r4eWtwlmIZ6PGo/k32Z/kHAMHgslokpc8OCuGhKIcxUZ23FkM43Ef6Ow7Hy/GspS4=
on:
tags: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "node-poppler",
"version": "1.7.4",
"description": "Node.js wrapper for the Poppler PDF rendering library",
"description": "Asynchronous node.js wrapper for the Poppler PDF rendering library",
"keywords": [
"async",
"pdf",
Expand Down
36 changes: 29 additions & 7 deletions src/index.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const fs = require('fs');
const glob = require('glob');
const os = require('os');
const path = require('path');
const { Poppler } = require('./index');

Expand Down Expand Up @@ -28,13 +29,34 @@ describe('Constructor', () => {
});

test('Should convert PDF file to SVG file with binary path set', async () => {
const testPath = path.join(
__dirname,
'lib',
'win32',
'poppler-0.89.0',
'bin'
);
const platform = os.platform();
let testPath;

switch (platform) {
// Windows OS
case 'win32':
default:
testPath = path.join(
__dirname,
'lib',
'win32',
'poppler-0.89.0',
'bin'
);
break;

// macOS
case 'darwin':
testPath = path.join(
__dirname,
'lib',
'darwin',
'poppler-0.89.0',
'bin'
);
break;
}

const poppler = new Poppler(testPath);
const options = {
svgFile: true
Expand Down

0 comments on commit 9089278

Please sign in to comment.