Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Setting up SASS and Compass to my needs

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #162603
    clayton47
    Participant

    I read this article on css-tricks – https://css-tricks.com/compass-compiling-and-wordpress-themes/

    I’m not getting how to set it up for my needs. By default when I run “compass my-sass” for example it sets up directory structure like this –

    my-sass/ directory my-sass/sass/ directory my-sass/stylesheets/ create my-sass/config.rb create my-sass/sass/screen.scss create my-sass/sass/print.scss create my-sass/sass/ie.scss create my-sass/stylesheets/ie.css create my-sass/stylesheets/print.css create my-sass/stylesheets/screen.css

    I would like to set it up for the wordpress environment like others have mentioned. I did setup a –bare project. Then manually had to go create all the files I needed. Is there a way to automate this process? There has got to be, I’m just so new to this. Would it be a compass configuration or maybe using something else like yeoman?

    Please forgive my ignorance with this. This seems to be the way to go!

    #162621
    Alen
    Participant

    Compass comes with configuration file.

    When you scaffold the project there should be config.rb file created. You can use it to set all the directory paths as needed.

    #162622
    clayton47
    Participant

    I understand that. It just seemed a bit confusing when creating a project. What I did was used the compass create –bare command. So then manually I created my scss files, setup the config file. Is that the normal way everyone does it? There is no way everyone uses the default files the way they are spit out when not doing a –bare project.

    #162623
    Alen
    Participant

    Well anything that you “scaffold” will give you opinionated structure and files. Just configure the config.rb file to fit your needs after you scaffold and delete the unnecessary files.

    #162624
    clayton47
    Participant

    I think its a bit redundant to have to do all of that every time don’t you? There has got to be a better way…. Is there not a master config you can edit with in compass so when you run the create command it does what you want right way. Or is that to specific?

    #162626
    Alen
    Participant

    I guess, but how many times are you starting new project. You can even save the snippet in your editor, or save a blank template file. I honestly don’t think it’s an issue.

    #162629
    clayton47
    Participant

    I do small freelance work. I start new projects all the time. I work within a couple of different environments. I assume you could do this all manually every time. With the tools we have at hand today ( and I am new to using them) they automate so many things we are repetitive with. So I figured there was a shortcut for this too. I’ma keep on digging, I’m so new to compass, sass I haven’t quite got my bearings yet. I guess just like anything else you have to get comfortable with it. I will post an update if I find something, so I can share it.

    #162630
    Alen
    Participant

    I’m not exactly sure what you are trying to automate. What if you need slightly different configuration each time? Would you need to edit the automation script each time as well? Like I said, seems very minuscule issue to me…

    I’d follow these steps:

    • Create new bare project
    • Edit config file to fit your directory structure
    • Copy, or create Sass files in appropriate directory
    • Run compass watch

    This will probably take you less than 5 min.

    If you want you can create GitHub repository (free) with the most common configuration and just use git to pull the files. Or as I mentioned earlier, use a template or snippet, and save them locally.

    #162632
    clayton47
    Participant

    Oh for sure. It wouldn’t hardly take any time at all. Maybe I am just mis understanding the capabilities of the tools I am trying to use. I can create a bare project and get setup probably within a couple mins. Thanks for your time and suggestions!

    #162683
    nixnerd
    Participant

    I don’t really mess around with the compass config too much. However, I’m sure you could write a bash script that creates the project and echoes the changes you want to the config file upon creation. Then you could create an alias for this script/command with a really simple syntax.

    #162684
    nixnerd
    Participant

    I don’t use Ruby… Ever. With the exception of Compass/SASS which doesn’t require me to know it, I don’t touch ruby. However, I’m certain that if you know Ruby, you could accomplish your goal even easier than the solution above.

    #162697
    clayton47
    Participant

    I for sure would like to explore options like this just for the sake of knowing how to do it. You could have several scripts for different setups you commonly do. That would be cool.

    #162723
    nixnerd
    Participant

    I have scripts for a lot of things I do. Very handy.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘Other’ is closed to new topics and replies.