I already create some white label products and most of the time there is still the same problem… customization. It is really hard to match design needs of customers, you can let them upload there logo, change some texts, even provide different templates for a widget for example but one thing hard is to change colors or fonts or stuffs like that. Of course you can provide a service to include their own stylesheet but if you change the css of your widget, all css of your customers have to be tested again and some can not work and moreover you cannot control what they do and if there is a problem even because of them they will call you to say “it doesn’t work! please, fix it!”.

Against this, I wanted to find a clear solution where the customer just set the variables he wants like the main color, the border radius, shadows… everything you want and you can control. With all of this and thanks to SCSS variable it is possible to customize a CSS.

Continue to read →

Today, after a long time without posting I will show you how to integrate bower in a Rails application. Many times I was a bit frustrated when I found a nice lib I want to include in a project but when I want to find the associated gem, sometimes the lib is not up to date inside and I have to wait for the new version of the gem… Another solution is to download the version of the lib you want and put it in the vendor directory but in that case it can be really boring to maintain…

Now there is a solution for that thanks to Bower.

Continue to read →

Recently I worked on a migration from Backbone to Angular for a customer, I wrote the Backbone code about one year ago and it started to be hard to maintains so I decided to migrate to Angular to have something easier to improve when this customer will change the front end or add some new features. I was really curious to see the impact of a migration like that (I mean for maintainability more than speed or whatever).

Continue to read →

Every time I wrote some Javascript I use Coffeescript for those posts (and most of the time for dev also). The problem is, some people don’t know Coffee and don’t want to use it for good or bad reasons, this doesn’t matter. So I wanted to offer the possibility in this blog to switch between coffeescript and javascript files.

This blog is written with Octopress and with it you can write or modify some plugins. My goal now is to modify the plugin which convert my code block (using ```…```) from markdown to a pretty block with colors and everything and then modify it to add another block with the javascript compiled from coffee.

Continue to read →

Last time I was talking about Google Analytics in your rails app. Today I will continue with Google Analytics but this time in your emails.

This is a small hack but it can be really useful. As you probably know, with a classic email, you cannot know if the receiver open the email you just sent but when you use some services like Mailchimp or Sendgrid, you can have those statistics. So today we will do like Sendgrid and Mailchimp but using Google Analytics.

I will not talk too much, here is directly the trick to log when people open your email.

Continue to read →

Today we will see how to collect your data from Google Analytics. Everyone use it, I’m sure, but sometime, for many different reasons, you can have to collect those data using the API provided by google. Of course with rails most of the time you can find a gem to do that and for Google Analytics API you have garb.

This gem allows you to connect to your google account (or the one of your customer) and then fetch all the information you need.

In theory it’s not so complicated, but in practice if you want to provide a real analytics engine, this gem in not so convenient.

Let’s see how to implement it in a basic way first. Let’s say I just want all the time the same metrics, the number of visits per day during the last month.

Continue to read →

The last post was talking about Grunt and how to add all your bower dependencies in your index file. Today we will see how to do that, still using Grunt, but this time Grunt will do everything, we will not have to run the command all the time.

The goal here is to detect when the bower.json file is updated and when it’s the case, run the task bower-install to inject all dependencies in your html and in bonus to automatically refresh your browser using livereload.

Continue to read →

Last tool about Yeoman and this is perhaps the more interesting because today I will talk about Grunt.

Grunt is an awesome tool to help you to run some automatic tasks. Usually when you develop you have many times the same way to work and the same task to execute again and again like for example lint your js files or css, compile your sass or coffee files or different kinds of stuffs like that. Of course this is not really time consuming usually you can execute each task using one command line and even sometime like compiling your coffee you have some watcher already included.

Ok, but now what you think about having all those commands simplified in one file and many other and finally be able to run all your task automatically (even the ones without watcher like lint your files). Grunt do that.

Continue to read →

After an introduction to Yeoman and the tool Yo few days ago, today I will talk about the second tool from Yeoman workflow which is Bower.

Bower is not a revolutionary tool but it’s really useful. Bower is a like NPM (used for Node.js) for your front end scripts. If you don’t know that tool, NPM is a package manager to help you to download and link the packages you want in your js application (using a nodejs server as development tool or server).

The problem when you create a new application with a lot of js is to resolve all dependencies.

Continue to read →

I just realized I’d never talked about some tools like Yo, Grunt or Bower so today I will fix this and I will talk about Yeoman

First I saw on many blogs, poeple who are a bit confusing about Yeoman, Yeoman is not a scaffolding tool, it is just an installer for 3 different tools:

  • Yo: This one is the scaffolding tool
  • Bower: A package manager for your front end
  • Grunt: A task runner
yeoman

Even if Yo and Yeoman starts with the same letter it’s not a reason to mix them together ;) I think this confusion come because the same team is working on Yo and on Yeoman and moreover Yo generate configuration for bower and grunt which is some tools of Yeoman workflow. Anyway, this is close but keep thinking Yeoman is not a scaffolding tool but just a kind of workflow including awesome tools.

Continue to read →

Copyright © 2014 - Anthony Estebe -