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
// assuming your render component recieves a stream called selectedTargets$ that emits an object of the source/target languages you're translating | |
const vtree$ = sources.translate$.debug().map(translation => | |
div('#registrationScreeenPage.panel.contentTop.active', [ | |
div(translation('foo')) | |
]); | |
); |
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 {div, form, fieldset, legend, label, input, button, i, strong} from '@cycle/dom'; | |
import {makeHTTPDriver} from '@cycle/http'; | |
import isolate from '@cycle/isolate'; | |
import xs from 'xstream'; | |
import classes from 'dependencies/classes'; | |
import styles from '../form/styles.less'; | |
import LabelInput from 'components/label-input'; |
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 {div, form, fieldset, legend, label, input, button, i, strong} from '@cycle/dom'; | |
import {makeHTTPDriver} from '@cycle/http'; | |
import isolate from '@cycle/isolate'; | |
import xs from 'xstream'; | |
import classes from 'dependencies/classes'; | |
import styles from '../form/styles.less'; | |
import LabelInput from 'components/label-input'; |
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 webpack = require('webpack'), | |
path = require('path'), | |
CopyWebpackPlugin = require('copy-webpack-plugin'), | |
webpackEnv = require('webpack-env'), | |
fs = require('fs'); | |
nodeExternals = require('webpack-node-externals'), | |
externals = nodeExternals(); | |
var config = { | |
context: path.resolve(__dirname), |
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 {div, form, fieldset, legend, label, input, button, i, strong} from '@cycle/dom'; | |
import {makeHTTPDriver} from '@cycle/http'; | |
import isolate from '@cycle/isolate'; | |
import xs from 'xstream'; | |
import classes from 'dependencies/classes'; | |
import styles from '../form/styles.less'; | |
import LabelInput from 'components/label-input'; |
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
Show hidden characters
{ | |
"presets": ["es2015","es2016"], | |
"only": ["**/src/ui/**.js", "**/src/server.js"], | |
"ignore": "**/node_modules/**.js", | |
"sourceMaps": "inline", | |
"plugins": [ | |
["cycle-hmr/xstream", { | |
"include": "**/src/ui/**.js", | |
"testExportName": "^[A-Z]|default" | |
}] |
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 {h} from '@cycle/dom'; | |
import xs from 'xstream'; | |
import Test2 from './test2'; | |
import Test3 from './test3'; | |
let Test1 = function(sources) { | |
return { | |
DOM: Test2(sources).DOM | |
// DOM: Test3().DOM |
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 {h} from '@cycle/dom'; | |
import xs from 'xstream'; | |
import Login from 'login'; | |
let app = function(sources) { | |
return { | |
DOM: Login(sources).DOM | |
}; | |
} |
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 styles from './styles.less'; | |
const render = (state) => h('form', {props: {className: [styles.form, styles.formHorizontal].join(' ')}}, [ | |
h('fieldset', [ | |
// show alerts if there's any | |
state.alerts.length ? h('div.alerts', | |
state.alerts.map(alert => h(`div.alert.${alert.className}`, alert.text)) | |
) : '', | |
h(`legend.${styles.legend}`, 'Login'), | |
h(`div.${styles.field}`, [ | |
h(`label`, 'Email'), |
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
SELECT SUM(`earnings`) AS `total` FROM `rooms` WHERE `room_type` = 'single' AND `roomPrice` NOT NULL |