Skip to content

Instantly share code, notes, and snippets.

View santiq's full-sized avatar
⌨️
Coding

santy santiq

⌨️
Coding
View GitHub Profile
@chonz0
chonz0 / emoji-commits.md
Last active December 28, 2016 12:25
Emoji commits
Emoji Snippet Context
🎉 :tada: initial commit
:sparkles: new feature
:heavy_plus_sign: add feature
:heavy_minus_sign: remove feature
📦 :package: modify package dependencies
🌐 :globe_with_meridians: internationalization / translations
🔧 :wrench: tooling
🎨 :art: when improving the format/structure of the code
@NaokiStark
NaokiStark / content.js
Created February 24, 2016 04:02
fixed repeated buttons
const serverURL = 'http://glacial-cove-76906.herokuapp.com';
getVotes= function(shoutId,cb){
$.get(serverURL+'/get-votes?shout_id='+shoutId,function(res,status){
return cb(res,status);
});
}
renderButtons = function(){
@noahmiller
noahmiller / gulpfile-error-handling.js
Created May 15, 2014 16:54
Example error handling in a gulpfile
var gulp = require('gulp');
var gutil = require('gulp-util');
var jshint = require('gulp-jshint');
// Command line option:
// --fatal=[warning|error|off]
var fatalLevel = require('yargs').argv.fatal;
var ERROR_LEVELS = ['error', 'warning'];
@floatdrop
floatdrop / thoughts.md
Last active January 18, 2021 03:54
Error management in gulp

#Error management in gulp

Sucking at something is the first step to becoming sorta good at something

No one can assure you, that plugins will run smooth in any circumstances (except for tests - they could), so neither should you convince anyone, that your plugin will never break. Only thing, that you could possibly do (if something gone wrong) - is gracefully inform your plugin user, that something went wrong and die.

We are will use this plugin from beginning to demonstrate error management. Suppose you have a task in gulpfile.js that contains this code (we modified it a little bit to be closer to real-usage):

var coffee = require('gulp-coffee');