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
'use strict' | |
var join = require('path').join | |
var plan = require('flightplan') | |
const application = 'example.com' | |
const deployTo = join('/var', 'www', application) | |
const repoUrl = 'https://github.com/example/example.git' | |
const branch = 'master' | |
const keepReleases = 3 |
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
export const mapDispatchToProps = actions => dispatch => Object.keys(actions).reduce((obj, key) => { | |
obj.actions[key] = bindActionCreators(actions[key], dispatch) | |
return obj | |
}, { actions: {} }) | |
// connect(null, mapDispatchToProps({ action1, action2 }))(ReactComponent) | |
// => this.props.actions.action1, this.props.actions.action2 | |
export const mapStateToProps = properties => store => properties.reduce((obj, property) => { | |
if (store.hasOwnProperty(property)) { |
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
// Utility to check if value is a Promise | |
function isPromise(value) { | |
if (value !== null && typeof value === 'object') { | |
return value && typeof value.then === 'function' | |
} | |
return false | |
} | |
// Cache |
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
@mixin position($position, $args: null) { | |
$offsets: bottom left right top; | |
position: $position; | |
@if (type-of($args) == 'list') { | |
@each $offset in $offsets { // 3 | |
$index: index($args, $offset); // 4 | |
@if $index { // 5 |
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
import { createElement } from 'react' | |
import { renderToString } from 'react-dom/server' | |
export default function renderHookServer( | |
hookInit: Function | |
): // eslint-disable-next-line @typescript-eslint/no-explicit-any | |
any { | |
let hookOutput = undefined | |
function HookWrapper() { |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
OlderNewer