This file contains 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
$icons: ( | |
"access-point": F002, | |
"access-point-network": F003, | |
"account": F004, | |
"account-alert": F005, | |
"account-box": F006, | |
"account-box-outline": F007, | |
"account-card-details": F5D2, | |
"account-check": F008, | |
"account-circle": F009, |
This file contains 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
{ | |
"errors": [ | |
], | |
"warnings": [ | |
], | |
"version": "1.12.2", | |
"hash": "943a89361ef0d15cc5b6", | |
"publicPath": "/assets/", |
This file contains 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 | |
changed_files="$(git diff --name-only --cached)" | |
check_run() { | |
echo "$changed_files" | grep -q '\.js$' && eval "$1" | |
} | |
check_run "npm run-script lint" |
This file contains 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
let ctrl = this, | |
listResource = resource(( ) => `/api/list/${ctrl.listId()}`, { scope: $scope }), | |
followedByUserResource = resource( ( ) => `/api/user/following`, { scope: $scope }), | |
listUsersReducer = | |
composedReducer(listResource, followedByUserResource, ( ) => ctrl.query) | |
.reduce(( list, followed, query ) => { | |
return list.users.filter( | |
user => user.username.includes(query); | |
) |
This file contains 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
let ctrl = this, | |
followers = resource('/api/user/followers', { scope: $scope }); | |
followers.reduce( ( requestOptions, data ) => data.filter(follower => follower.followed_by_user)); | |
ctrl.getFollowing = ( ) => followers.data(); |
This file contains 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
let ctrl = this, | |
listType = 'following', | |
listItems, | |
state; | |
let fetchData = ( ) => { | |
state = 'pending'; | |
$http({ | |
url: `/api/user/list/${listType}` | |
}) |
This file contains 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 listeners = [], | |
$window; | |
beforeEach(function ( ) { | |
var fn; | |
if(!$window) { | |
$window = angular.injector([ 'ng' ]).get('$window'); |
This file contains 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
Array.prototype.slice.call(document.querySelectorAll('.yt-lockup-meta-info > li:first-child')).forEach(function ( el ) { | |
var views = Number(el.textContent.match(/(\d+,?\d+)/)[0].replace(',','')), | |
parent; | |
if(views < 1000) { | |
parent = el.parentNode; | |
while(!parent.classList.contains('channels-content-item')) { | |
parent = parent.parentNode; | |
} | |
parent.parentNode.removeChild(parent); |
This file contains 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
I'm using webpack to compile my application source. It splits up the files in chunks which are lazily loaded when necessary. However, the sourcemaps for the first file (main.js) breaks if the second file (2.js) is loaded in. | |
Here's when it _does_ work. | |
- if I throw an error in main.js immediately instead of with a timeout | |
- if 2.js is not lazily-loaded but available in a script tag when the page is rendered | |
Here's what I've tried to make it work | |
- remove the sourcemap for 2.js | |
- remove the content of 2.js |
This file contains 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
import _ from 'lodash'; | |
import angular from 'angular'; | |
import 'angular-new-router'; | |
import 'oclazyload'; | |
function AppController ( ) { | |
} | |
AppController.$routeConfig = []; |