Tuesday, February 3, 2015

Deploying to Heroku using Gulp, Node, and Git

Whether you’ve used it or not you’ve probably heard about Heroku at some point wandering around the Web. Heroku lets you deploy, run, and manage projects written in Ruby, Node.js, Java, Python, Clojure, Scala, and PHP. This platform brings joy to so many developers because of its amazing build packs that create a robust deployment workflow.


Heroku Deployment


Let’s examine the required files needed to deploy a project to Heroku using Gulp, Git, and Node.


Heroku Terminology


Before we begin, we’ll make sure a few bits of terminology are defined.



Dyno

A lightweight Linux container that runs a single user-specified command. A dyno can run any command available in its default environment. Read more about Dyno types here.

Buildpacks

These lie behind the slug compilation process. They’re open source, enabling you to extend Heroku to other languages and frameworks. Buildpacks take your application, its dependencies, and the language runtime, and produce slugs.

Slug

A bundle of your source, fetched dependencies, the language runtime, and compiled/generated output of the build system – ready for execution.


File Requirements


In order to run a Node-based project on Heroku, we need a few things to get started. The first thing we need is a project. For our purposes, we’ll use the Transformicons Open Source project as the example for this tutorial. You can also use the Transformicons repo with your own free Heroku account to practice outside this article!


Make a Procfile


Begin by making a blank file named Procfile and placing it within the root of your project. Procfile is short for “Process File” and used to explicitly declare what command should be executed to start your app. By default, a Procfile is not required, but it’s good form for Node-based projects to create one.


If a Procfile isn’t defined, then one will be created automatically using npm start as the web process type. Here’s the Procfile process command for Transformicons:


[code language="bash"] web: node node_modules/gulp/bin/gulp build [/code]

The line above lets us use the locally installed version of Gulp provided by Node’s Package Manager (NPM) instead of having to use a globally installed version. The gulp build portion of that command in this case will fire up a server, compile Sass, concatenate / uglify JavaScript, replace asset calls, cache bust file names, compile templates with Assemble, and finally minify our compiled HTML documents! This is the part where we dance our pants off


Continue reading %Deploying to Heroku using Gulp, Node, and Git%




by Dennis Gaebel via SitePoint

The Kings Arms

The Kings Arms


Lovely One Pager for 'The Kings Arms' Pub in London forming the last out of a chain of 3 London pubs under the Windmill Taverns Group. Digital agency Green Chameleon have really done a great job keeping the design consistent with the others but still keeping it unique enough to give this branch it's own personality. Easily my favorite feature is the menu that loads up full screen with a beautiful layout and the option to easily switch between the others. So often you see PDF menu solutions but this one is fully responsive and consistent with the rest of the site design. Top effort.



by Rob Hope via One Page Love

Vector Graphics in Sass

Sass is a very powerful tool and many of us are still examining it's limits. What can we do with it and how far can we push it?


After throwing ideas at Hugo Giraudel, I got myself very excited about one idea; a 2D graphics engine. This may be confusing, because CSS and thus Sass is already part of the realm of graphics. Instead of styling content, I wanted to (ab)use Sass to render an image, pixel by pixel. The output can be drawn as a box-shadow value on a 1x1 pixel element.


Examining strategies


One way is to iterate through a grid and a list of objects, and check if a pixel should be drawn. Sass would have to process n x width x height iterations, where n is the amount of objects. That is a lot of work so not very performant, especially considering loops in Sass aren't fast. Instead of rendering the entire grid, it is possible to render only parts that may contain an object by getting a so called bounding box. Check out the demo.


A better option is to use paths.


Paths may sound familiar to you. It is a common term in graphics software like Adobe Illustrator and Adobe Photoshop, but the term occurs in web technologies like SVG and HTML5 too. A path is a list of coordinates that are connected in sequence. All I need to define a shape is a couple of coordinates. If you are familiar with paths, you probably know you can make curved paths as well. For now, I will stick to straight lines.


The process of converting a vector path to pixels – or in our case a vector path to a box-shadow – is called rasterizing.


Scanline algorithm


Paths are often rendered using the scanline algorithm. Personally, whenever I hear the word "algorithm" I panic and execute whatever exit strategy I have at hand. This algorithm however is surprisingly comprehensible, so don't be scared just yet!


We iterate through the vertical pixels. For every row, we store the intersections of all lines of that path. After iterating through all lines, we sort and iterate through the intersections from left to right. At every intersection, we toggle drawing.


Scanline Algorithm

Sass implementation


Before rendering anything, it is useful to know what to render. We have to define a path. I think a list of coordinates is a pretty good set-up:


Continue reading %Vector Graphics in Sass%




by Tim Severien via SitePoint

BSW-Blog

Online magazine for Stiftung Bahn-Sozialwerk (BSW)




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Tea Innovation Agency

Webdesign / Softwares / Graphic and Industrial design in Tarbes, France.




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

New York Pilates

Website redesign and rebrand project for fashion forward Pilates company, New York Pilates. The goal was to simply project the brand image while maintaining a focus on sales oriented clicks having multiple points of entry on multiple pages with liqui




by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Västra Ämterviks Bryggeri

Västra Ämterviks Bryggeri


One Pager built with Adobe Muse promoting a new Swedish brewery 'Fryken' from the heart of Fryksdalen. Fryksdalen is the geographical term for the valley around Frykensjöarna in Värmland, Sweden. A pity it's not responsive but a clear presentation of the product with crisp imagery. You'd almost expect the craft beer slider to have the beer images in exactly the same place but I quite like how it changes with the white transition effect.



by Rob Hope via One Page Love