Skip to content

Instantly share code, notes, and snippets.

View bendera's full-sized avatar

Adam Bender bendera

  • Budapest, Hungary
  • 12:20 (UTC +01:00)
View GitHub Profile
@bendera
bendera / dev-client.js
Created October 11, 2016 13:44
Webpack + Vue.js hot module replacement config in an existing site
// build/dev-client.js
/* eslint-disable */
require('eventsource-polyfill')
var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true&path=http://localhost:8080/__webpack_hmr')//<-- HMR config
hotClient.subscribe(function (event) {
if (event.action === 'reload') {
window.location.reload()
}
@bendera
bendera / _box-shadow.scss
Created October 1, 2015 22:47
box-shadow functions
@function get-box-shadow($shadow-obj) {
$box-shadow-str: '';
@for $i from 1 through length($shadow-obj) {
$layer: nth($shadow-obj, $i);
@if (map-get($layer, inset) == true) {
$box-shadow-str: $box-shadow-str + inset + ' ';
}