Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
support puppeteer. fixes #204
Browse files Browse the repository at this point in the history
  • Loading branch information
igorklopov committed Aug 23, 2017
1 parent d9a1185 commit 175a780
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dictionary/puppeteer.js
@@ -0,0 +1,15 @@
'use strict';

module.exports = {
pkg: {
patches: {
'utils/ChromiumDownloader.js': [
'path.join(__dirname, \'..\', \'.local-chromium\')',
'path.join(path.dirname(process.execPath), \'puppeteer\')'
]
},
deployFiles: [
[ '.local-chromium', 'puppeteer' ]
]
}
};
1 change: 1 addition & 0 deletions test/test-79-npm/puppeteer/package.json
@@ -0,0 +1 @@
{ "private": true }
16 changes: 16 additions & 0 deletions test/test-79-npm/puppeteer/puppeteer.js
@@ -0,0 +1,16 @@
'use strict';

var fs = require('fs');
var puppeteer = require('puppeteer');

puppeteer.launch().then(function (browser) {
browser.newPage().then(function (page) {
page.goto('https://example.com').then(function () {
page.screenshot({ path: 'example.png' }).then(function () {
browser.close();
fs.unlinkSync('example.png');
console.log('ok');
});
});
});
});
7 changes: 7 additions & 0 deletions test/test-79-npm/puppeteer/puppeteer.meta.js
@@ -0,0 +1,7 @@
'use strict';

module.exports = function () {
return {
deployFilesFrom: [ 'puppeteer' ]
};
};

0 comments on commit 175a780

Please sign in to comment.