Skip to content

Instantly share code, notes, and snippets.

View AndersSchmidtHansen's full-sized avatar

Anders Schmidt Hansen AndersSchmidtHansen

View GitHub Profile
@AndersSchmidtHansen
AndersSchmidtHansen / gulpfile.litcoffee
Last active August 29, 2015 14:07
Gulpfile for AngularJS projects

Gulpfile - The Configuration

In this file we fire up all the necessary Gulp plugins needed for running this application. As you may have noticed, it uses the Literate Coffeescript format, so there is no need to do classic code comments. Just write it as Markdown and indent whenever you need to run some code.

Initialization

@AndersSchmidtHansen
AndersSchmidtHansen / vue-bem.js
Last active March 23, 2020 17:00
Vue BEM Directive - A vue.js directive for automatic BEM class generation when creating components. A very rough example can be found here: https://jsfiddle.net/at1h1z1z/6/
/*
|--------------------------------------------------------------------------
| Vue BEM Directive
|--------------------------------------------------------------------------
|
| If you find yourself writing a lot of long, tedious CSS class names in
| order to be consistent with the BEM naming convention, then try this
| directive. It automagically does all the heavy lifting based on
| the component's name found in $options.name.
|