Skip to content

Commit 60fb28a

Browse files
committed
Re-implemented min & purge CSS
1 parent f24ecf8 commit 60fb28a

7 files changed

+413
-10
lines changed

cli/record.js

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const options = {
3232
js: 'on', // disable JS execution and capturing
3333
minify: null, // min final HTML before save
3434
minCSS: null, // min final CSS before save
35+
purgeCSS: null, // purge unused CSS and generate 1 single CSS file
3536
timeout: 15, // navigation timeout
3637
imgTimeout: 15,
3738
wait: 5, // wait for user interaction (seconds)

cli/restore.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const options = {
3333
}
3434

3535
const { page, browser } = await restorePage(args);
36-
page.on('close', process.exit);
37-
browser.on('disconnected', process.exit);
36+
page.on('close', () => process.exit());
37+
browser.on('disconnected', () => process.exit());
3838

3939
await delay(args.wait);
4040
await browser.close();

package-lock.json

+296-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
],
55
"dependencies": {
66
"@cliqz/adblocker-playwright": "1.27.11",
7-
"clean-css": "5.3.3",
87
"cross-fetch": "4.0.0",
98
"html-minifier-terser": "7.2.0",
9+
"lightningcss": "1.25.x",
1010
"mri": "1.2.0",
1111
"playwright": "1.32.3",
1212
"pretty-bytes": "6.1.1",

0 commit comments

Comments
 (0)