Skip to content

Instantly share code, notes, and snippets.

all:
force:
token=<your-github-token>
user=<your-github-username>
org=<your-github-organization>
auth_opt=-u $(user):$(token)
# note: not all repos are in there! hitting the page limit of 30.
all:
force:
token=<your-github-token>
user=<your-github-username>
org=<your-github-organization>
auth_opt=-u $(user):$(token)
# note: not all repos are in there! hitting the page limit of 30.
path=$1
random_string=`date +%s | gsha256sum | base64 | head -c 32`
echo "Compiling..."
NODE_ENV=production webpack -p --progress --colors --config ./webpack.prod.config.js
echo "Moving files..."
cd dist/
mkdir -p $path/www_rails/public/new-map
rm -f $path/www_rails/public/map-files/*.*
mv bundle.js $path/www_rails/public/new-map/$random_string-bundle.js
mkdir -p $path/www_rails/public/map-files
import TopTribes from './index';
import TopTribeItem from './TopTribeItem';
import { shallow, mount } from 'enzyme';
describe('TopTribes', () => {
it('renders nothing if there are no tribes', function() {
var props = {
top_tribes: []
};
└── src
└── containers
└── ItemList
├── actions.js
├── constants.js
├── index.js
├── presenter.js
├── reducer.js
└── spec.js
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import ListItem from '../ListItem'
import BlankState from '../BlankState';
require('./style.css');
class ItemList extends Component {
constructor(props) {
super(props);
import { takeEvery, takeLatest } from 'redux-saga'
import { call, put } from 'redux-saga/effects'
import Api from '...'
// worker Saga: will be fired on USER_FETCH_REQUESTED actions
function* fetchUser(action) {
try {
const user = yield call(Api.fetchUser, action.payload.userId);
yield put({type: "USER_FETCH_SUCCEEDED", user: user});
} catch (e) {
import * as actions from '../../actions'
import * as types from '../../constants/actionTypes'
import itemTypeReducer from './ItemTypeReducer'
describe('itemTypeReducer', () => {
it('Toggles the Hotel item into the selected array', function() {
let initialState = {
selected: []
};
let action = {
import * as actionTypes from '../../constants/actionTypes';
const initialState = {
selected: 'Hotel',
}
export default function itemTypeReducer(state = initialState, action) {
if (action.type == actionTypes.SELECT_ITEM_TYPE) {
return {
selected: action.itemType
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-bootstrap/lib/NavItem';
import ItemListCounter from '../../../lib/Helpers/ItemListCounter';
import Counter from '../../Counter';
require('./style.scss');
class ItemTypeSelector extends Component {