Javascript News

Syndicate content
Pipes Output
Updated: 48 weeks 6 days ago

A Simple Gulp’y Workflow For Sass

Do, 2015-06-11 14:00

I have recently been in charge of optimizing the Sass side of quite a big Rails project, and one of most important things to do was to improve the compilation time. Because of the Sass architecture in place and the fact that Ruby Sass (through the Rails asset pipeline in this case) tends to be slow when dealing with a huge number of files, it could take up to 40 seconds to compile the stylesheets. Talk about a fast development process. :)

My idea was to move away from the asset pipeline and embrace the speed of LibSass. To make things easier I decided to go with a simple Gulp workflow. It was the first time I would be using Gulp, and I must say it was quite an enjoyable experience (which was not the case for Grunt as far as I am concerned).

In this short article, let's just have a quick tour on how to set up a Gulp'y workflow to work with Sass. Here is what we will include:

  • Unsurprisingly, Sass compilation with LibSass
  • Generating sourcemaps for easier debugging
  • Prefixing CSS with Autoprefixer
  • Generating Sass documentation with SassDoc

Continue reading %A Simple Gulp’y Workflow For Sass%

What’s New in Rails 5

Do, 2015-06-11 14:00

Rails 5 is right around the corner (currently targeting Fall 2015) and there are some exciting features coming up. If you are running a Rails shop, you need to prepare your apps for this major release.

Don't worry. As always, we at Sitepoint will guide you throughout the migration process when the release date approaches. For now, let's catch you up on what's coming and how it will improve your development process.

Major Improvements

There are some amazing announcements that will fundamentally shift how we work with Rails. New features like Action Cable and improved Turbolinks that can instantly improve our web development workflow. Let's look at each of them in detail.

Continue reading %What’s New in Rails 5%

Retro Rockets and IP Lawyers

Do, 2015-06-11 13:46

I've designed a lot of book covers for SitePoint – mostly without incident – but we did have one uncomfortable moment back in 2008. Tasked with designing the cover for a new PHP book, I decided that a clutch of shiny, colored rockets - red, green and blue - might be a nice look. I trawled the big, reputable stock photography sites and eventually purchased a 3D render of a red-chequered rocket (similar to the one above). A little Photoshop magic and I had added green and blue rockets to the composition, and voila!, we had a book nice cover. End of story – or so we thought. About 10 months later we received a letter from a legal firm representing the Tintin licensing rights empire claiming financial damages from infringement of their product. This came as somewhat of a shock to us as: a). Growing up with little awareness of TinTin, the rocket was just a 'generic rocket' to us. In fact, only two of the original 24 Tintin books used the rocket, so you could easily have read some Tintin without ever coming across the rocket. b). We'd purchased the image from one of the top biggest stock sites on the planet (no names, but you know them). The rocket image and any image like it had since disappeared from all stock image sites (presumably after similar letters). At the time we sought legal advice and eventually came to an agreement, removing the image from subsequent books. Meet Moulinsart SA After a little research it turned out that Moulinsart SA, the Belgium-based company that controls the Tintin licensing rights, are famous for their fierce pursuit of anyone they believe to be infringing the TinTin IP. Over the years this has included many Tintin fan clubs, websites and zines which, and this has made the company particularly unpopular with many of Tintin's biggest fans. But as they say, discretion is the better part of valour, so Moulinsart often get their way.

Continue reading %Retro Rockets and IP Lawyers%