Skip to content

Commit

Permalink
Re-implemented min & purge CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
croqaz committed Jun 28, 2024
1 parent f24ecf8 commit 60fb28a
Show file tree
Hide file tree
Showing 7 changed files with 413 additions and 10 deletions.
1 change: 1 addition & 0 deletions cli/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const options = {
js: 'on', // disable JS execution and capturing
minify: null, // min final HTML before save
minCSS: null, // min final CSS before save
purgeCSS: null, // purge unused CSS and generate 1 single CSS file
timeout: 15, // navigation timeout
imgTimeout: 15,
wait: 5, // wait for user interaction (seconds)
Expand Down
4 changes: 2 additions & 2 deletions cli/restore.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const options = {
}

const { page, browser } = await restorePage(args);
page.on('close', process.exit);
browser.on('disconnected', process.exit);
page.on('close', () => process.exit());
browser.on('disconnected', () => process.exit());

await delay(args.wait);
await browser.close();
Expand Down
297 changes: 296 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
],
"dependencies": {
"@cliqz/adblocker-playwright": "1.27.11",
"clean-css": "5.3.3",
"cross-fetch": "4.0.0",
"html-minifier-terser": "7.2.0",
"lightningcss": "1.25.x",
"mri": "1.2.0",
"playwright": "1.32.3",
"pretty-bytes": "6.1.1",
Expand Down
Loading

0 comments on commit 60fb28a

Please sign in to comment.