From a311d245965cfdf390ba5cbd2109ee4f49bc0455 Mon Sep 17 00:00:00 2001 From: Atanas Atanasov Date: Mon, 8 Jan 2024 10:41:05 +0200 Subject: [PATCH] Updates (#833) --- .circleci/config.yml | 4 ++-- critical.mjs | 21 +++++++++------------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e2ad7e6..fea623e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,8 +6,8 @@ jobs: steps: - checkout - run: - name: autoreconf - command: sudo apt install automake + name: dependencies + command: sudo apt-get update -y && sudo apt-get install automake libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release xdg-utils wget libxss1 - run: name: xss command: sudo apt update && sudo apt install libxss1 diff --git a/critical.mjs b/critical.mjs index 468d86e9..1634fcbd 100644 --- a/critical.mjs +++ b/critical.mjs @@ -1,14 +1,11 @@ import { generate } from 'critical'; -generate( - { - src: 'index.html', - css: ['assets/dist/app.css'], - target: 'assets/dist/critical.css', - width: 1440, - height: 900 - }, - (err, { css, html, uncritical }) => { - console.log({ err, css, html, uncritical }); - } -); +generate({ + src: 'index.html', + css: ['assets/dist/app.css'], + target: 'assets/dist/critical.css', + width: 1440, + height: 900 +}).then(({ css, html, uncritical }) => { + console.log({ css, html, uncritical }) +}); \ No newline at end of file