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
| # which environments your script is designed to run in. Each environment brings with it a certain set of global variables and rules that are enabled by default. | |
| env: | |
| browser: true # - browser global variables. | |
| #node: true # - Node.js global variables and Node.js-specific rules. | |
| #worker: true # - web workers global variables. | |
| # amd: true # - defines require() and define() as global variables as per the amd spec. | |
| #mocha: true # - adds all of the Mocha testing global variables. | |
| #jasmine: true # - adds all of the Jasmine testing global variables for version 1.3 and 2.0. | |
| #phantomjs: true # - phantomjs global variables. | |
| #jquery: true # - jquery global variables. |
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
| function capitalize (str) { | |
| return str.replace(/(?:^|\s)\S/g, a => a.toUpperCase()); | |
| } |
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
| function extend () { | |
| return [].reduce.call(arguments, function (prev, current) { | |
| for (var prop in current) { | |
| if (!current.hasOwnProperty(prop)) continue; | |
| if (/^(object|array)$/.test(type(current[prop])) && current[prop] !== current) { | |
| if (!/^(object|array)$/.test(type(prev[prop]))) { | |
| prev[prop] = type(current[prop]) === 'array' ? [] : {}; | |
| } | |
| prev[prop] = extend(prev[prop], current[prop]); | |
| } else { |
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
| [alias] | |
| pr = pull --rebase origin | |
| po = push origin | |
| poH = pugh origin HEAD | |
| co = checkout | |
| st = status --short | |
| f = fetch | |
| fa = fetch --all | |
| k = !gitk | |
| ka = !gitk --all |
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
| #!/bin/sh | |
| red="\033[0;31m" | |
| yellow="\033[1;33m" | |
| green="\033[1;32m" | |
| reset="\033[0m" | |
| read -a changed_files <<< $(git diff --cached --name-only --raw) | |
| # check if there're any JS related files in commit | |
| runTests=false |
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
| // ---- | |
| // libsass (v3.2.5) | |
| // ---- | |
| // from http://www.sitepoint.com/extra-map-functions-sass/ | |
| /// jQuery-style extend function | |
| /// About `map-merge()`: | |
| /// * only takes 2 arguments | |
| /// * is not recursive | |
| /// @param {Map} $map - first map |
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
| module.exports = grunt => { | |
| const LIVERELOAD_PORT = 35729; | |
| require('load-grunt-tasks')(grunt, {}); | |
| require('time-grunt')(grunt); | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), |
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
| class Events { | |
| constructor () { | |
| this._events = {}; | |
| } | |
| on (name, listener, context) { | |
| // support multiple event names | |
| this._events[name] = this._events[name] || []; | |
| // check if already present | |
| this._events[name].push({listener, context}); |
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 _state = Symbol('previous_state'); | |
| const _listeners = Symbol('listeners'); | |
| class Store { | |
| constructor(state = {}) { | |
| this[_state] = {}; | |
| this[_listeners] = []; | |
| this.setState(state); | |
| } |
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
Show hidden characters
| { | |
| "presets": ["es2015"], | |
| "plugins": ["transform-decorators-legacy"] | |
| } |