keegnotrub / coda-sass-plugin

A plug-in for Panic's Coda 2 that converts scss files into css files.
https://github.com/keegnotrub/coda-sass-plugin
82 stars 9 forks source link

See if remote FTP editing can be supported #1

Closed keegnotrub closed 10 years ago

cedriccharles4 commented 10 years ago

Hi :) ! Have you got something new about it :) ?

Thanks a lot !

keegnotrub commented 10 years ago

Sorry but not yet. I spent a bit Sunday closing #2 but haven't gotten to this one yet. Thanks for the interest though, I'll see if I can take a look sometime this upcoming weekend.

Just to be sure I understand - you'd like to have it so that if from within Coda you decide to edit a remote scss file and you save some changes, the remote css file is also generated - correct?

cedriccharles4 commented 10 years ago

Hi @keegnotrub !

Yeah that's right ! For some reasons, I need to do CSS editing on production site, I know it's bad ;). So I would like to edit the remote scss, save it and automatically create/edit the remote css too.

It also would be great if we can specify the folder of the generated css file, in order to have the scss in a folder, and the css in another.

Thanks a lot for your support and for your great initiative with this coda plugin :) !

cedriccharles4 commented 10 years ago

Also, is your plugin compatible with COMPASS ? Thank you very much !

keegnotrub commented 10 years ago

Compass unfortunately is not supported. An alternative may be to use http://bourbon.io until this issue gets closed with the library this plugin uses:

https://github.com/hcatlin/libsass/issues/82

Thanks though and hopefully Bourbon can meet you needs!

cedriccharles4 commented 10 years ago

Hi @keegnotrub :) !

What I need is something very usefull to use, without any terminal actions. It's not for me, but for some co-workers ;) !

I hope Compass and remote process will be supported soon cause it's very useful for designers ;) !

Thanks a lot !

brainra commented 10 years ago

I agree with cedriccharles4, I'm impatient for the remote process to be supported and hope it is possible ! It would be a badass feature.

Thanks a lot for your fantastic plugin

toddgilbert commented 10 years ago

I'd also absolutely love FTP support!

toddgilbert commented 10 years ago

I tried a few things to work around this like MacFusion or a "Transmit Drive" to no avail. Anxiously awaiting this.

GabrielGil commented 10 years ago

Really interested on FTP support too! Your plugin already rocks!

LindseyLeanne commented 10 years ago

I also would be thrilled to have FTP/remote CSS. I imagine many people would want to even pay for a Coda plugin that includes that!

cedriccharles4 commented 10 years ago

Hi @keegnotrub !

Any news on this ? I also pay for a Coda plugin that includes that ;) !

Thanks a lot

GabrielGil commented 10 years ago

Seems like nobody cares this. I'm deploying a plugin to generate and cache .scss files on the server side, so it' just compile the file if the original .scss changes.

cedriccharles4 commented 10 years ago

@GabrielGil Where can we find that ?

GabrielGil commented 10 years ago

I'll be upload it soon to GitHub since i'm doing the final touches to the compiler.

It's gonna be available to use with composer, but i also want to create something easy to integrate with WordPress theme development and similar.

May I ask you in what kind of projects you're using SAAS so I could give easy way to integrate it?

cedriccharles4 commented 10 years ago

@GabrielGil ! Awesome, my team and I are working exclusively on Wordpress theme. We use the Bones starte theme (http://themble.com/bones/), which use SASS by default.

Thanks a lot

keegnotrub commented 10 years ago

@GabrielGil @cedriccharles4 - I've kept this issue open as I still don't have a great plan of attack for how to implement this feature as a plugin to Coda.

I thought using the following from Coda's Plugin Docs might help:

- (NSString*)willPublishFileAtPath:(NSString*)inputPath` 

However upon doing a quick Google search there seems like there may be an issue with using this function.

Thinking about it a little more I was concerned that even if I was able to get this function to work, I would have to traverse the file system remotely in order to find any scss partials which might not be something you'd want to do as its going to be pretty slow.

I guess right now these are my main two stumbling blocks in order to get this feature into the plugin. I'd definitely appreciate any suggestions in how best to approach these challenges.

Thanks again for the feedback.

cedriccharles4 commented 10 years ago

:'( ! I can't help you with that since I'm not a mac dev...

Hope you'll find something ! Did you contact the coda team ?

keegnotrub commented 10 years ago

I was curious as to the network lag to get this to work so I used Panic's Transmit application to mount a SFTP site as a Disk. I then just navigated to this mounted disk in Coda and changed an scss file and it updated the corresponding css file.

However the lag to preform this operation was quite substantial (like about a second) so I don't think this feature is something I'm going to pursue at this time. If it is something that others really need I'd suggest using Transmit to mount their remote sites as a local disk in order to have Coda publish the corresponding css file on save.

mattejames commented 9 years ago

Late to the party here, I know, but I would absolutely love for this plugin to work with remote files as my development environment is actually in the cloud.

Just to make sure I understand the context, is the issue that partials may exist on the remote system and you're not sure what directory they're in? Or is it that you have to traverse just the same directory as the .scss file, but that even this can take a bit of time? If so, how much time? IMHO, the trade-off might be worth it for those who work remotely like this. I mean, if it's 30 seconds or so, that's a deal-breaker and not even worth pursuing. But if you can get it to work over FTP and it takes 1-3 seconds to compile, that's a reasonable wait time from my perspective.

Just a thought for those who don't have Transmit.

maxflex commented 9 years ago

Really need this feature too.

keegnotrub commented 9 years ago

@mattejames - you're exactly right, the issue is that when partials exist the latency to traverse a remote file system and pull them down can sometimes be a few seconds long.

I compile the sass files on the main UI thread so this lag would cause Coda to freeze for a few seconds. I could possibly look into doing the work on a separate thread and displaying a progress bar if it takes longer than a 1/2 second or something but right now thats more work than I can allot time for with this project.

Until I can find the time I would recommend mounting the remote file system as a local disk via Transmit or OS X Fuse (open source).

GabrielGil commented 9 years ago

I know I've been one of those who wanted this feature working ASAP, however nowadays based on my experience, I highly recommend to move somewhere else your dev environment. Local environment is obsolete in the cloud era. I'd def recommend use Cloud9.

Also for those looking for a WP plugin for compile sass, this is a good option BUT the compiler version is not updated and some features might be missing. Also note, things like comment blocks might mess your final code upside down. In Wordpress.org: WP-SCSS

mattejames commented 9 years ago

I thought it would be worth documenting one issue I ran into. If you plan to use Transmit to load up a remote SFTP share as a volume, know that the ownership of the files change when this occurs. So if your files are owned by the SFTP user on the remote server and you load up the volume, they become owned by your local OS X user instead. For me, this translated into issues using WordPress to do updates since WP needs permission to overwrite files and may not have them if you change the owner. Unfortunately, the only solution to the issue is to 777 the files according to Panic support.

If the remote feature is added, however, this becomes a non-issue as permissions are not changed for the files.