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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']; |
#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');