Skip to content

Instantly share code, notes, and snippets.


Leo Lamprecht leo

View GitHub Profile
View error-example.html
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
cursor: default;
leo / package.json
Last active July 28, 2016 10:49
Using npm as a build tool (bad)
View package.json
"scripts": {
"install": "npm run build",
"start": "parallelshell 'livereload dist' 'nodemon index -w views/ -e hbs,js -i assets/'",
"build:js": "rollup assets/js/app.js > dist/app.js",
"build:scss": "node-sass assets/scss -o dist --output-style compressed",
"build:images": "cp -r assets/images/* dist/images",
"prebuild": "rm -rf dist && mkdir dist && mkdir dist/images",
"build": "npm run build:js && npm run build:scss && npm run build:images",
"watch:js": "watch 'npm run build:js' assets/js",
"watch:scss": "watch 'npm run build:scss' assets/scss",
leo / ember-body-class.js
Created March 11, 2016 10:51
The easiest way to add the name of the current route as class to the body.
View ember-body-class.js
activate () {
var classes = this.genClasses()
if (classes !== 'application') {
deactivate () {