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

; are considered syntax error under sass style tags #4

Closed
ShayDavidson opened this issue Nov 4, 2015 · 6 comments
Closed

; are considered syntax error under sass style tags #4

ShayDavidson opened this issue Nov 4, 2015 · 6 comments

Comments

@ShayDavidson
Copy link

less works fine for example

@hedefalk
Copy link
Owner

hedefalk commented Nov 4, 2015

Well, aren't ; syntax error in old sass? I'm not expert, only used less and scss (sass2).

Look here:

https://github.com/hedefalk/atom-vue/blob/master/grammars/vue.cson#L158
vs
https://github.com/hedefalk/atom-vue/blob/master/grammars/vue.cson#L187

@hedefalk
Copy link
Owner

hedefalk commented Nov 4, 2015

Sorry, Sass 3 that is.

@ShayDavidson
Copy link
Author

Well, yes, but:

  • when the lang is sass, the new syntax (with semicolons) is compiled, but Atom shows a syntax error on the semicolons.
  • when the lang is scss, Atom doesn't show any syntax error for the semicolon, but vue/webpack can't find a scss-loader module for compilation.

(using webpack and vue-loader for compilation).
Maybe it's a config problem on my side, but I can't seem to fix it.
Anyway, I now realize this is not an issue with your package, hence closing it.

@hedefalk
Copy link
Owner

hedefalk commented Nov 5, 2015

I'm successfully using webpack with

{ test: /.scss$/, loader: "style!css!sass" },

in webpack.config.js

and

"sass-loader": "~2.0.1",
"css-loader": "~0.17.0",
"style-loader": "~0.12.3",

in package.json -> devDependencies

Oh, wait, maybe I'm not… I'm not actually using any styling in my components there, seems to be on the side…

Please consider PR if you find any solution. This package was just something I auto-created for my own use mechanically (with a script) from the sublime one: https://github.com/vuejs/vue-syntax-highlight at a particular commit: vuejs/vue-syntax-highlight@4796727

Any work there by @yyx990803 et al hasn't been merged in here since.

@hedefalk
Copy link
Owner

hedefalk commented Nov 5, 2015

I'm not sure, but I would guess that https://github.com/vuejs/vue-loader simply delegates to a matching loader. So if you write lang=scss in your .vue to make this atom plugin happy, you need to have:

{ test: /.scss$/, loader: "style!css!sass" },

and not

{ test: /.sass$/, loader: "style!css!sass" },

in your webpack config. Can this be the issue?

@aidistan
Copy link
Contributor

aidistan commented Nov 5, 2015

Please try the workaround @ShayDavidson

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