Skip to content
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

CLI works but not for node code #206

Open
fr-cdc-nicholas opened this issue Sep 6, 2018 · 2 comments
Open

CLI works but not for node code #206

fr-cdc-nicholas opened this issue Sep 6, 2018 · 2 comments

Comments

@fr-cdc-nicholas
Copy link

I can get it working in terminal
purifycss js css --min --info --out ./index.css
But, in the node code, it doesn't

purify(js, css, {minify: true, output: './index.css'}, report => console.log(report))

It returns me something like

node_modules/css/lib/parse/index.js:72
      throw err;
      ^

Error: undefined:1:87: missing '{'
    at error (node_modules/css/lib/parse/index.js:62:15)
@neutraali
Copy link

neutraali commented Sep 27, 2018

Getting exactly this same error with purify-css 1.2.5. We have no use for the CLI version.
Full error details:

Error: undefined:1:75: missing '{'
    at error (/dev/example/node_modules/css/lib/parse/index.js:62:15)
    at declarations (/dev/example/node_modules/css/lib/parse/index.js:248:25)
    at rule (/dev/example/node_modules/css/lib/parse/index.js:561:21)
    at rules (/dev/example/node_modules/css/lib/parse/index.js:118:70)
    at stylesheet (/dev/example/node_modules/css/lib/parse/index.js:81:21)
    at module.exports (/dev/example/node_modules/css/lib/parse/index.js:565:20)
    at rework (/dev/example/node_modules/rework/index.js:27:21)
    at CssTreeWalker.beginReading (/dev/example/node_modules/purify-css/lib/purifycss.js:568:24)
    at purify (/dev/example/node_modules/purify-css/lib/purifycss.js:1009:10)
    at Object.<anonymous> (/dev/example/webpack/tasks/purify.js:11:1)

@juancresc
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants