Skip to content

Instantly share code, notes, and snippets.

View ondrej-janosik's full-sized avatar

Ondřej Janošík ondrej-janosik

View GitHub Profile
@ondrej-janosik
ondrej-janosik / map.js
Created March 3, 2019 11:19
redux-starter-kit createReducer
import { createAction, createReducer } from 'redux-starter-kit';
/**
* Adds marker to the map. Payload: marker data
*/
export const addMarker = createAction('map/add-marker');
/**
* Toggles marker visibility
*/
@ondrej-janosik
ondrej-janosik / actions.js
Last active March 3, 2019 11:26
redux-starter-kit createAction
import { createAction, createReducer } from 'redux-starter-kit';
/**
* Adds marker to the map. Payload: marker data
*/
export const addMarker = createAction('map/add-marker');
/**
* Toggles marker visibility. Payload: marker id
*/
@ondrej-janosik
ondrej-janosik / index.js
Created March 3, 2019 10:49
redux-starter-kit configureStore
import { configureStore, getDefaultMiddleware } from 'redux-starter-kit';
import logger from 'redux-logger'
import cameraReducer from './reducers/camera';
import mapReducer from './reducers/map';
const store = configureStore({
reducer: {
camera: cameraReducer,
map: mapReducer,
@ondrej-janosik
ondrej-janosik / bitbucket-pipelines.yml
Last active May 4, 2021 15:20
Using NPM CI and Cypress with Bitbucket Pipelines
# Check out my blog post about this topic at https://medium.com/@ondrej.janosik42/setting-up-bitbucket-pipelines-with-proper-caching-of-npm-and-cypress-74d033888186
image: node:10.8.0
options:
max-time: 30
pipelines:
default:
- step:
name: Install, build and tests
caches:
- npm