filamentgroup / criticalCSS

Finds the Above the Fold CSS for your page, and outputs it into a file
MIT License
1.7k stars 76 forks source link

How to use CLI #63

Closed symbios-zi closed 1 year ago

symbios-zi commented 5 years ago

Hello. I have installed this package using npm. Trying to run this script in console. I have added to package.json this:

...
  "scripts": {
    "criticalcss" : "criticalcss --url=https://my-site.com --file=critical.css"
  }
...

and got an error Error: PHANTOM ERROR: Error: The filename you have given is not found at this url. TRACE: -> phantomjs://code/rules.js: 53

How can I fix it?