- Make sure you have yo installed:
npm install -g yo
- Run:
yo webapp
- Install grunt-contrib-jade:
npm install grunt-contrib-jade --save-dev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ico-flag-australia:before { | |
background-position: 0px top; | |
} | |
.ico-flag-brazil:before { | |
background-position: -16px top; | |
} | |
.ico-flag-canada:before { | |
background-position: -32px top; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@for $i from 1 through length($countries) { | |
$country: nth($countries, $i); | |
.ico-flag-#{$country} { | |
@include flag-sprite($i); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin flag-sprite($offset) { | |
$offset: $offset - 1; | |
&:before { | |
background-position: 16px*-$offset top; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@for $i from 1 through length($countries) { | |
$country: nth($countries, $i); | |
.ico-flag-#{$country} { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@each $country in $countries { | |
//do something with $country | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$countries: australia brazil canada chile costa_rica croatia greece india iran italy mauritania poland russia rwanda south_africa spain united_states zimbabwe; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd folder/with/icons | |
for string in `ls` | |
do | |
echo ${string%%.*} | tr '[:upper:]' '[:lower:]' | sed 's/-/_' | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ico-flag { | |
position: relative; | |
height: 11px; | |
&:before { | |
content: ""; | |
position: absolute; | |
width: 14px; | |
height: 11px; | |
top: 50%; | |
left: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated on 2013-08-28 using generator-webapp 0.4.1 | |
'use strict'; | |
var LIVERELOAD_PORT = 35729; | |
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT}); | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
// # Globbing | |
// for performance reasons we're only matching one level down: |