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
{ | |
"_id": "@cerebral/useragent", | |
"_rev": "14-6667b038dc0504d85b2e55f833468eef", | |
"name": "@cerebral/useragent", | |
"description": "Adds useragent specs to your cerebral state model", | |
"dist-tags": { | |
"latest": "1.0.0", | |
"beta": "0.0.0-beta.3", | |
"next": "1.0.1-1502489943822" | |
}, |
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
{ | |
"_id": "@repo-cooker-test/commis", | |
"_rev": "8-9d9955e22534c33863efe63cc875cedb", | |
"name": "@repo-cooker-test/commis", | |
"description": "I made a big mistake.", | |
"dist-tags": { | |
"latest": "1.0.0", | |
"next": "2.0.0-1502373638156" | |
}, | |
"versions": { |
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
const path = require ( 'path' ) | |
// in app/index.html | |
// you need to <script type='text/javascript' src='build/app.js'></script> | |
module.exports = | |
{ entry: './src/boot.tsx' | |
, node: | |
{ __dirname: false | |
} | |
, output: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>azemoh</string> | |
<key>name</key> | |
<string>Two Dark Theme</string> | |
<key>settings</key> | |
<array> |
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
// Original signal definition layout by Christian | |
[ | |
dispatch(AUTHENTICATING), | |
authenticateUser, { | |
error: [ | |
dispatch(AUTHENTICATED_ERROR) | |
], | |
success: [ | |
dispatch(AUTHENTICATED_SUCCESS), | |
dispatch(ASSIGNMENTS_LOADING), |
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 { Component as CComp, render as Crender } from 'cerebral-view-snabbdom' | |
import { ContextType } from '../modules/context.type' | |
const SVGNS = 'http://www.w3.org/2000/svg' | |
const modulesNS = [ 'hook', 'on', 'style', 'class', 'props', 'attrs' ] | |
const slice = Array.prototype.slice | |
interface SubComponent { | |
( props: any, children: VNode[] ) | |
} |
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
// A way to express the full workflow of an edit in a single file | |
// inspired by Christian Alfoni's thoughts on rxjs-app. | |
// In Cerebral.js, an Operation could be a signal with a single action filtering on input.operation. | |
// The emit function would be a wrapper around this signal, passing required context. | |
// The only new element is the 'emit' function passed through the actions and "binding" them together. | |
export const editSingleProp = Operation | |
( { start: ( { input, services: { auth }, emit } ) => { | |
if ( auth.editAllowed ( input.path ) ) { | |
emit ( 'editAllowed' ) | |
} |
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 { Context, Renderable, RenderText } from '../types' | |
export const render = function | |
( ctx : Context | |
, sub1 : Renderable<RenderText> | |
, sub2 : Renderable<RenderText> | |
) : RenderText { | |
const res1 = sub1 ( ctx ).text | |
const res2 = sub2 ( ctx ).text |
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 { Context } from './types' | |
import * as dummy from './dummy' | |
import * as g1 from './graph/Hello' | |
import * as g2 from './graph/Lucy' | |
import * as g3 from './graph/Mix' | |
import * as g4 from './graph/Stereo' | |
import * as g5 from './graph/Reverse' | |
import * as g0 from './main' | |
const dg1 = { render: g1.render } | |
const fg1 = function ( ctx : Context ) { |
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
{- | |
Rendering this: | |
+------+ | |
| main | | |
+------+ | |
| | |
+-------------+ | |
| a. Anaglyph | |