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

@import 'path' is not working #12

Open
ValMilkevich opened this issue Aug 20, 2016 · 4 comments
Open

@import 'path' is not working #12

ValMilkevich opened this issue Aug 20, 2016 · 4 comments

Comments

@ValMilkevich
Copy link

Hello,

First of thanks for creating scss-to-json - it helps a lot!

I'm currently struggling with parsing file that contains an import statement: @import '../../shared/sass/variables' to json

Resulting in an error:
Warning: Invalid CSS after "...test { content:": expected expression (e.g. 1px, bold), was "@import '../../shar" Use --force to continue.

Please may you advise?
Thanks in advance!
Regards,
Val

@gbdrummer
Copy link

I'm also experiencing this issue with an @import from google fonts ala:

@import url("http://fonts.googleapis.com/css?family=Open+Sans:400,600,700|Cardo");

Error output is the same.

@gbdrummer
Copy link

gbdrummer commented Sep 14, 2016

My temporary fix is to add && line.indexOf('@import') < 0 to the end of line 30 of processor.js, which currently looks like:

return line !== lineValue && line.slice(0, 2) !== COMMENT_DELIMETER;

@elidupuis
Copy link

I just ran into this error as well.

@amberleyromo
Copy link

@ryanbahniuk any chance of merging a change that ignores '@import' lines? (Like @gbdrummer suggested). Allows use of the same file to transform scss -> css and separately accomplish the json transform.

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

4 participants