Comments (21)
@jschreck as mentioned above, there is some places that the plugin will automatically match where to place the accompanying css
file.
Presently, if you are saving a file named style.scss
the plugin will:
- Look to see if
style.css
exists in the same directory asstyle.scss
. If so, it will use that. - Look up one directory to see if we have a directory named either
css
,styles
,stylesheets
, orstyle
. If so, it will generatestyle.css
in that directory.
Would you be able to let me know if the above doesn't fit your use case and if so what your specific use case looks like? Thanks!
from coda-sass-plugin.
Hmm, that should work as well provided that none of the parent directories contain a matching {name}.css file. Could you check all the intermediate directories and if any contain a {name}.css file delete it and re-save?
My comment above wasn't absolutely complete in terms of the algorithm, more explicitly it looks like this:
- Look to see if {name}.css exists in the same directory as {name}.scss. If so, it will use that.
- Look up one directory to see if we have a directory named either css, styles, stylesheets, or style. If so, it will generate style.css in that directory.
- Repeat step 2 until we run out of parent directories
- If nothing was found in step 3, then just save in the same directory as {name}.scss
from coda-sass-plugin.
Yes, this would be very useful. The CSS is being generated to the same sass folder while compass compile / watch saves it to ../css
from coda-sass-plugin.
@rfmarcelino - There is some "intelligence" as to where it finds the accompanying css
file for the scss
file you are saving. Could you try this:
- Move (don't copy) the
css
file that is being generated to../css
- Open the
scss
file make a change and save - Check to see if the
css
file located in../css
was updated
from coda-sass-plugin.
@keegnotrub - I tested this and it does indeed work. Might be useful to add to the readme here.
Naturally, having a preferred output path config would still be more awesome, but I'll take it. : +1:
Thanks for responding.
from coda-sass-plugin.
Thanks @keegnotrub, that worked !
Could be useful to have this info somewhere besides here. In my case this was a make/break feature.
Thanks a lot for your great work.
from coda-sass-plugin.
One thing that doesn't seem to be working for me is there is a stylesheet located at "../stylesheets/{name}.css" but it isn't locating this automatically. Could we add a rule to automatically check the parent directories?
from coda-sass-plugin.
Hmm.. That should work - just to double check, could you make sure there isn't already a matching {name}.css file in your sass directory? If there is, delete that first before saving as it may be finding that before it finds your "../stylesheets" directory.
from coda-sass-plugin.
Sorry I'm using the foundation framework, the stylesheet is actually located at "../../stylesheets/{name}.css" so it's 2 directories up.
from coda-sass-plugin.
Please see this screenshot of the directory structure from Foundation - http://s9.postimg.org/bosb41gfz/Screen_Shot_2015_12_11_at_2_32_16_p_m.png.
I saved the scss and it writes it to the same folder 'config'. I tried deleting foundation.css from the stylesheets folder and resaving the scss but it does the same thing and writes foundation.css to the config directory. Not sure if I'm doing something wrong or it just isn't noticing where the file should be written to.
By the way, thanks for your quick replies! Apart from that this module works perfectly.
from coda-sass-plugin.
Thanks for snapshot. I don't see anything immediately so I might have to setup a test like this to see why you are getting this behavior. I may not have time immediately to do so but I'll try to look into it soon.
from coda-sass-plugin.
No problem I don't mind copy/pasting the document each time for now. For test purposes, I am working on the Foundation WordPress framework.
from coda-sass-plugin.
Thanks for this again, it looks like I found the issue. I'll publish an update, in the meantime - I believe this should work for you if you rename your "stylesheets" directory to "css", then make sure to delete any "foundation.css" files and try again.
from coda-sass-plugin.
Okay great thank you, please let me know when there is a fix available and how I can upgrade. Many thanks.
On 11 Dec 2015, at 14:58, Ryan Krug [email protected] wrote:
Thanks for this again, it looks like I found the issue. I'll publish an update, in the meantime - I believe this should work for you if you rename your "stylesheets" directory to "css", then make sure to delete any "foundation.css" files and try again.
—
Reply to this email directly or view it on GitHub.
from coda-sass-plugin.
Fix should be included in this release:
https://github.com/keegnotrub/coda-sass-plugin/releases/tag/v3.1.2
from coda-sass-plugin.
Great thank you!
On 14 Dec 2015, at 1:28 pm, Ryan Krug [email protected] wrote:
Fix should be included in this release:
https://github.com/keegnotrub/coda-sass-plugin/releases/tag/v3.1.2 https://github.com/keegnotrub/coda-sass-plugin/releases/tag/v3.1.2
—
Reply to this email directly or view it on GitHub #22 (comment).
from coda-sass-plugin.
Sorry to open this back up, but I just started using this plugin and it only recognizes a folder named 'css' one directory up. If it's names styles, stylesheets, etc. or if it's more than one directory up, it defaults to compiling in the same directory. Using Coda 2.5.16 and the most recent plugin.
from coda-sass-plugin.
Thanks @heathflohre - Can you double check that you are running the most recent plugin from the release page on Github:
https://github.com/keegnotrub/coda-sass-plugin/releases/tag/v3.1.2
I believe Panic is still using v3.1.1 which didn't include this fix. I've been meaning to submit the fix to Panic as well, but haven't yet.
from coda-sass-plugin.
It was version 3.1.1, but it's still occuring with 3.1.2.
from coda-sass-plugin.
After testing, it is now recognizing directories with the other names. I was hoping it would look inside folders one level up. So, if 'scss' and 'build' folders are at the same level, it would save the compiled file in 'build/css'.
from coda-sass-plugin.
Hello,
I'm working with Coda 2.5.16 and I installed the plugin version 3.1.2
I created a folder named "site/customer/scss" with a file inside name "screen.scss"
The plugin works good at this point because it creates a folder "site/customer/css" and "screen.css".
But after I created a folder "admin" inside the "scss" one with the file "admin.scss" ( path is : "site/customer/scss/admin/admin.scss") , the output "admin.css" goes to the parent :
"site/customer/css/admin.css" instead of "site/customer/css/admin/admin.css"
It is possible to change this?
(others files are not created with SASS)
from coda-sass-plugin.
Related Issues (20)
- Doesn't compile media querys HOT 3
- Why not .sass files? HOT 3
- Live preview/auto-refresh HOT 1
- Using random() function HOT 3
- Using Sass autosave remotely HOT 8
- Some Bourbon Mixins missing. HOT 3
- inline comments causing compiling issue HOT 2
- Plugin crashes after every saving in Coda 2.5.10. HOT 1
- Wrong conversion HOT 1
- Coda Not recognizing changes to generated css file for publishing. HOT 2
- Coda now crashes when I hit save HOT 8
- Doesn't seem to work when I save .scss file HOT 2
- Save a .scss file in the FTP HOT 8
- Optional save HOT 2
- Compress option HOT 2
- Source map broken link HOT 2
- No way to save the CSS files ind another folder HOT 1
- Support for the newest version of SASS
- macOS 10.15 Catalina issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coda-sass-plugin.