To specify which version of Node the app should be using, use the engines
property on package.json
, like so (in this case sticking to version 5):
{
"name": "my-app",
...
"engines": {
"node": ">=5.0.0 <6.0.0"
// Calculate chance | |
const chance = (percentage) => { | |
const probability = (percentage / 100); | |
return (Math.random() < probability ? 1 : 0); | |
}; | |
// Set percentage of possibility (10 = 10%, 75 = 75%) | |
const possibility = chance(70); | |
// Only execute it if 'possibility' is truthy | |
if (possibility) { | |
// It's possible! |
$font-fallback: arial, sans-serif; | |
$path-fonts: '../fonts'; | |
.font-defaults { | |
font-weight: normal; | |
font-style: normal; | |
-webkit-font-smoothing: antialiased; | |
} | |
@font-face { |
// ~ Margin & padding helper ~ | |
// by @dreamyguy - Wallace Sidhrée [http://sidhree.com] | |
// See https://gist.github.com/dreamyguy/2fc16be42a01f21527c5a12bbb662f08 | |
// Based on https://gist.github.com/jacurtis/30da4bf9a6c9b9b5cc0aebac512ca7c9 by J. Alexander Curtis | |
// | |
// Generates the following classes: | |
// .m-t-[x]: margin-top [y]rem. | |
// .m-b-[x]: margin-bottom [y]rem. | |
// .p-t-[x]: margin-top [y]rem. | |
// .p-b-[x]: margin-bottom [y]rem. |
[ | |
[ | |
915148800000, | |
0.0010 | |
], | |
[ | |
946684800000, | |
0.1133 | |
], | |
[ |
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
#!bin/bash | |
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching |
// iOS Detection | |
// Clumsy but handy way to detect iOS devices and refer to them when needed. | |
Modernizr.addTest('ipad', function () { | |
return !!navigator.userAgent.match(/iPad/i); | |
}); | |
Modernizr.addTest('iphone', function () { | |
return !!navigator.userAgent.match(/iPhone/i); | |
}); |
import {ENV} from '../../env'; // (ENV = 'dev' || 'prod') | |
export default function logMessage(message, styles) { | |
// 'ENV' will establish if this should be rendered or not. | |
// Since it's set to 'dev' by default, 'console.log' messages | |
// will not output in production. | |
if (ENV === 'dev' && typeof parent.window.console === 'object') { | |
parent.window.console.log(message, styles); | |
} | |
} |
$cl-black: #000; | |
$cl-green: #bada55; | |
$cl-red: #f00; | |
@function _buildIcon($icon) { | |
$icon: '%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20#{$icon}%3C%2Fsvg%3E'; | |
@return $icon; | |
} | |
@function _buildPath($path, $viewbox, $parameters) { |