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
function* displayer() { | |
const MaxToasts = 3; | |
const ToastDisplayTime = 4000; | |
let pendingToasts = []; | |
let activeToasts = []; |
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 babelLoader = 'babel?presets[]=es2015&presets[]=react&plugins[]=syntax-object-rest-spread'; | |
if (opts.hot) { | |
config.entry.app = [ | |
'webpack-dev-server/client?' + opts.publicPath, | |
'webpack/hot/only-dev-server', | |
config.entry.app, | |
]; | |
config.module.loaders.push({ | |
test: /\.jsx?$/, |
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
export default function* stampleFullScreenSaga() { | |
let openedStamples = []; | |
function* watchOpenedStamples() { | |
yield* takeEvery('*', function* (event) { | |
switch(event.name) { | |
case Names.STAMPLE_OPENED: | |
openedStamples = openedStamples.concat(event.data.stampleId); |
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
sebastien@sebastien-xps:Stample-react (nav-refactor $)$ apt-cache policy libnspr4:* | |
libnspr4-dbg: | |
Installed: (none) | |
Candidate: 4.10.10-0ubuntu0.12.04.1 | |
Version table: | |
4.10.10-0ubuntu0.12.04.1 0 | |
500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages | |
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages | |
4.8.9-1ubuntu2 0 |
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
'use strict'; | |
var React = require("react"); | |
var ReactDOM = require("react-dom"); | |
var WithOutsideClickListener = React.createClass({ | |
propTypes: { |
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
// We are integrating our legacy framework (that works a bit like Redux but with a shitty api) | |
// see https://github.com/stample/atom-react | |
// with existing redux tools like Redux-saga and React-redux | |
// Note that Reselect works too | |
// This is an adapter from atom-react store to redux store to be able to use connect() of react-redux | |
// See https://github.com/rackt/react-redux/issues/228 | |
function toReduxStore(atomReactContext) { | |
const onStateChangeListeners = []; |
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
function* runTimer(getState) { | |
while(yield take('START')) { | |
while(true) { | |
const {stop, tick} = yield race({ | |
stop : take('STOP'), | |
tick : call(wait, ONE_SECOND); | |
}) | |
if ( !stop ) { | |
yield put(actions.tick()); |
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
/** @jsx React.DOM */ | |
'use strict'; | |
var React = require("react/addons"); | |
var _ = require("lodash"); | |
var $ = require("jquery"); | |
var AtomReact = require("atom-react"); | |
var classNames = require('classnames'); |
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
if ( typeof cordova !== "undefined" ) { | |
// See https://github.com/EddyVerbruggen/Custom-URL-scheme | |
window.handleOpenURL = function handleOpenURL(url) { | |
setTimeout(function() { // setTimeout is required see plugin doc! | |
if ( url && (url.indexOf("stample://mobileclipper?") == 0) ) { | |
var queryString = parseQueryString(url); | |
if ( isClippableUrl(queryString.url) ) { | |
publishUrl(queryString.url, queryString.title); | |
} |