Skip to content

Feat: Use old version of chromium #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ At the moment, the best solution is to install ReLaXed in an empty directory as

```
git clone https://github.com/RelaxedJS/ReLaXed.git .
npm install
export PUPPETEER_CHROMIUM_REVISION=526987 && npm install
sudo npm link --unsafe-perm=true
```

Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"author": "Zulko",
"homepage": "https://github.com/RelaxedJS",
"license": "ISC",
"puppeteer": {
"chromium_revision": "526987"
},
"dependencies": {
"cheerio": "^1.0.0-rc.2",
"chokidar": "^2.0.3",
Expand Down
10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ const { performance } = require('perf_hooks')
const path = require('path')
const converters = require('./converters.js')

const chromiumRevision = process.env.PUPPETEER_CHROMIUM_REVISION
|| process.env.npm_config_puppeteer_chromium_revision
|| require('../package.json').puppeteer.chromium_revision

var input, output

program
Expand All @@ -30,8 +34,12 @@ const tempHTML = path.join(inputDir, '_temp.htm')

async function main () {
console.log('Watching ' + input + ' and its directory tree.')

const browserFetcher = puppeteer.createBrowserFetcher();
const revisionInfo = browserFetcher.revisionInfo(chromiumRevision);
const browser = await puppeteer.launch({
headless: true
headless: true,
executablePath: revisionInfo.executablePath
})
const page = await browser.newPage()
page.on('pageerror', function (err) {
Expand Down