See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| // requires raf.js (polyfil) | |
| (function(){ | |
| var ids = {}; | |
| function requestId(){ | |
| var id; | |
| do { | |
| id = Math.floor(Math.random() * 1E9); | |
| } while (id in ids); |
| /*------------------------------------*\ | |
| breakpoint vars | |
| \*------------------------------------*/ | |
| $break-320: 20em; | |
| $break-321: 20.0625em; | |
| $break-480: 30em; | |
| $break-600: 37.5em; | |
| $break-768: 48em; | |
| $break-980: 61.25em; | |
| $break-1024: 64em; |
| /** | |
| * ECMA2015 | |
| */ | |
| function convertHex(hexCode, opacity = 1){ | |
| var hex = hexCode.replace('#', ''); | |
| if (hex.length === 3) { | |
| hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; | |
| } |
| /** | |
| * Get the current active element safely. | |
| * Ref: https://github.com/jquery/jquery-ui/blob/2b84531ae9331f60e4d739fabca6d78abde89ae1/ui/safe-active-element.js | |
| */ | |
| function safeActiveElement(doc) { | |
| doc = doc || document; | |
| var activeElement; | |
| // Support: IE 9 only | |
| // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> |
| import axios from 'axios'; | |
| class Service { | |
| constructor() { | |
| let service = axios.create({ | |
| headers: {csrf: 'token'} | |
| }); | |
| service.interceptors.response.use(this.handleSuccess, this.handleError); | |
| this.service = service; | |
| } |
| var canvas = document.createElement('canvas'); | |
| var gl; | |
| var debugInfo; | |
| var vendor; | |
| var renderer; | |
| try { | |
| gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); | |
| } catch (e) { | |
| } |
| const recordAudio = () => { | |
| return new Promise(resolve => { | |
| navigator.mediaDevices.getUserMedia({ audio: true }) | |
| .then(stream => { | |
| const mediaRecorder = new MediaRecorder(stream); | |
| const audioChunks = []; | |
| mediaRecorder.addEventListener("dataavailable", event => { | |
| audioChunks.push(event.data); | |
| }); |
| # Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
| # GitLab uses docker in the background, so we need to specify the | |
| # image versions. This is useful because we're freely to use | |
| # multiple node versions to work with it. They come from the docker | |
| # repo. | |
| # Uses NodeJS V 9.4.0 | |
| image: node:9.4.0 | |
| # And to cache them as well. |
| .App { | |
| text-align: center; | |
| } | |
| .App-logo { | |
| animation: App-logo-spin infinite 20s linear; | |
| height: 40vmin; | |
| pointer-events: none; | |
| } |