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

better installation instructions? #50

Closed
akhatri opened this issue Nov 11, 2014 · 4 comments
Closed

better installation instructions? #50

akhatri opened this issue Nov 11, 2014 · 4 comments

Comments

@akhatri
Copy link

akhatri commented Nov 11, 2014

Hey just a question really
I'm trying to get this to work on my meteor app but it doesnt do anything.

I've installed the packages and created a scss.json file under client/lib

What goes inside this scss.json file? The Readme is a bit brief but as I am new to meteor i'm kinda struggling to get this working.

At the moment I just want it to work so all the scss files in my meteor app are compiled to css.
I have got bootstrap LESS package (I hope that is not causing a conflict?)

@fourseven
Copy link
Collaborator

Fair comment, the first suggestion would be around scss.json - it needs to be at the root of the project, not in a subfolder. The options it supports are similar to node-sass, plus the extras listed in our readme.

Apart from that having any .scss or .sass file should be transparently converted to css and loaded for you without further configuration.

@akhatri
Copy link
Author

akhatri commented Nov 13, 2014

hey i tried to implement what you suggested but it seems to give some parsing error through meteor logs

=> App running at: http://localhost:3000/ Error: failed to parse /home/ak/Desktop/wolverine/scss.json as JSON Error: failed to parse /home/ak/Desktop/wolverine/scss.json as JSON => Client modified -- refreshingError: failed to parse /home/ak/Desktop/wolverine/scss.json as JSON Error: failed to parse /home/ak/Desktop/wolverine/scss.json as JSON => Client modified -- refreshing (x2)Error: failed to parse /home/ak/Desktop/wolverine/scss.json as JSON Error: failed to parse /home/ak/Desktop/wolverine/scss.json as JSON => Client modified -- refreshing (x3)Error: failed to parse /home/ak/Desktop/wolverine/scss.json as JSON

I have only added this to the scss.json file (where all my scss and css files are kept at the moment)

{ "includePaths": [ "client/assets/scss" ] }

My root folder structure is as below

  • scss.json
  • client
    • assets
      • scss
        • 0-theme
        • 1-layouts
          • _style.scss
        • 2-modules
  • server

Shall i remove and re-add your meteor package?

@Naycon
Copy link
Collaborator

Naycon commented Nov 13, 2014

Hi Akhatri,

Actually, you don't need to specify any path to your assets in your scss.json file. Meteor does some magic for you and collects all the scss files it can find in your project folders (it ignores the server, private and all folders starting with a dot (".") though) and passes that on to this meteor package for handling. So you can simply remove the path from you scss.json file.

This here is what my scss.json file looks like right now:

{
    "enableAutoprefixer": true
}

It enables autoprefixing, it's all it does and all it needs to do. No more setting up is necessary.

I agree we can improve the documentation a bit to make it easier to get started for someone that is new to Meteor like yourself. The example with the paths in the documentation is for how to include scss files from a separate meteor package that gives you access to additional features (e.g. Bourbon, neat, etc.). Since these files are not in the project folder (they're in the ignored .meteor folder), you need to specify them manually.

@akhatri
Copy link
Author

akhatri commented Nov 17, 2014

Thanks a lot guys

I've got it to work. I believe the issue was with the filename of my scss file it was preceded with an _.
Hopefully this solves my problem. I guess when using the compass smart package compass circa francocatena:compass

i'd have to use the includePath in the scss.json correct.

@akhatri akhatri closed this as completed Nov 17, 2014
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