- This topic is empty.
February 11, 2014 at 9:23 am #162603
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!February 11, 2014 at 1:16 pm #162621
Compass comes with configuration file.
When you scaffold the project there should be
config.rbfile created. You can use it to set all the directory paths as needed.February 11, 2014 at 1:20 pm #162622
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.February 11, 2014 at 1:28 pm #162623
Well anything that you “scaffold” will give you opinionated structure and files. Just configure the
config.rbfile to fit your needs after you scaffold and delete the unnecessary files.February 11, 2014 at 1:36 pm #162624
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?February 11, 2014 at 1:50 pm #162626
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.February 11, 2014 at 2:05 pm #162629
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.February 11, 2014 at 2:27 pm #162630
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.February 11, 2014 at 2:31 pm #162632
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!February 12, 2014 at 6:43 am #162683
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.February 12, 2014 at 6:46 am #162684
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.February 12, 2014 at 8:38 am #162697
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.February 12, 2014 at 7:35 pm #162723
I have scripts for a lot of things I do. Very handy.
- The forum ‘Other’ is closed to new topics and replies.