Compile SASS on the iPad? - ipad

Is there an app to compile SASS (maybe even compass) on the iPad? I don't want do some server-side stuff. I can do that but I want to do it even if I'm not connected.

I'm guessing you want to code from your ipad.
Currently there's no way to do that locally on iOS; The closest thing to that would be using a Javascript port of sass (https://github.com/visionmedia/sass.js) to make a offline HTML5 app for copy paste compiling.
My advice is to run compass watch on the server that you're developing on via SSH

Related

How to "build Turbolinks.framework" for ios?

I haven't done any work building mobile apps with Rails, but I followed the very informative RailsConf demo from Sam Stephenson on Turbolinks 5 as a tool for building cross platform Apps with rails, Turbolinks 5 Demo and it looks great. The only part I can't replicate is how to get the "Turbolinks.framework" file that needs to be embedded in the iOS app shell.
The documentation at github's Turbolinks-ios page refers to a number of package managers for iOS (Carthage and CocoaPods) with which I am unfamiliar, or alternatively suggests "building Turbolinks manually and linking to my project." I think he demos the linking part, but no idea how to "build Turbolinks manually". Can someone give me a clue?
I have never done straight development like that. But I have done something different using Rails.
All you need is creating React-Native app web view implemented and pass url to rails pages (make sure rails app supports mobile responsive css). Including there you can benefit turbolinks events. It will save your precious time, and also, faster development!
Turned out to be very straightforward to install cocoapods and then use that to install Turbolinks-ios as mentioned on the git hub page.

Can't I use Polymer.js via CDN in rails app?

I want to add frameworks like AngularJS, Bootstrap and polymer JS into my rails app. Problem with the gems is they are unstable with new versions and they even stop developing gems(which leads to failing of one gem which depends on another)
So I just want to add those frameworks directly into the application root html file via CDN(offered by the vendor). Is that a good practice? Will it cause any future problems in production environment?
Yes, if you are using reliable CDN's (and those offered my vendors can be treat as one) it may even bring you some improvements in the production enviromnent, e.g.:
those assets will be often already cached on your user's machines
it circumvents browsers limit the number of concurrent connections from the same domain (as your app)
On the flip side, on your dev enviromnent you'll have to wait a liiitle bit more for the website to load those assets comparing it to loading them from localhost ;)
if you dont use CDN,you have much control over the assets ,as they might change/update or sometimes the url can be down :( in worst case scenario..so i suggest using local assets if there is large dependency and for small dependency ...you may use cdn. :)
use this to set up polymer js onlocal.

Integrating Sencha Touch with Rails

I have a website which need a mobile version.
I decided to use Sencha Touch 2.1 to create it.
I found the following Gem but it is clearly outdated.
So my question is do you know an easy way to integrate Sencha Touch with Rails Assets Pipeline?
The fact that the app needs to be built made me put it in the public directory for now.
Thanks.
I do not think Sencha Touch is a good use case in this scenario.
For a mobile version of a web application I would recommend switching to a framework with a responsive grid system such as Zurb foundation or Twitter bootstrap.
If you are still insisting on using Sencha Touch I would recommend creating a subdomain, such as http://mobile.domain.com and then serving the static files from something like S3, you can then use Sencha Touch to consume your Rails API.

Export my Rails site to Phonegap

I want to use Phonegap for create light cellular version of my site.
Is there any way to save all my HTML`s and assets (after merge all the partials, create the entire assets pipeline items and convert haml and coffees to html and javascript)?
I want to use Rails for writing my client side code and save it.
Thanks!
It depends on the site - if it is mostly static content it should work, but any user interaction will need to be built knowing that the server won't be there when the app runs. Using rails as a compiler for something designed as a phonegap app will work a lot better than trying to package an existing website.
Actually generating the static site is easy enough though:
wget -m -nH www.example.com

How to use Compass with symfony?

I'm currently experimenting with symfony, SASS, and Compass.
I use sfSassyCssPlugin to automatically compile my .scss files.
If I want to use Compass with this plugin, do I need to modify it to use another compiler (Compass instead of SASS)?
What's the best way to use Compass with symfony projects?
I've never used the sfSassyCSSPlugin, but, after looking it up, Compass seems like a much simpler use case to me; I'd probably use it in lieu of the plugin. That said, I've never been a fan of Symfony so my judgment may be clouded. Compass doesn't worry about your app's runtime. You edit, you compile, you run. No Symfony config files to mess with, no operational changes between different environments, etc.
Compass will also "watch" for changes and just compile each time one of your .scss or, my preference, .sass files changes. You don't have to give it a second thought.
sfSassyCSSPlugin looks like an extra layer of complexity wrapped around Compass. That plug-in is for symfony 1.x, with which you're better off using Compass directly.
Navigate to the project directory and issue the following command to set things up:
compass create web --css-dir=css
And then run next command, which will watch the project and compile the CSS whenever there's a change to the Sass:
compass watch web
But if you've moved up to Symfony2 and have CSS spread out across multiple bundles, then this: https://stackoverflow.com/a/11324725/1090474 answer, using Assetic, is a better solution.

Resources