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
{ | |
"plugins": ["import", "jsx-a11y", "react"], | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
"jest": true, | |
"node": true | |
}, |
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'); | |
const webpack = require('webpack'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const pkg = require('./package.json'); | |
let settings = { | |
version: pkg.version, | |
nodeEnv: 'development', | |
appEnv: process.env.APP_ENV || 'development', |
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 { | |
exampleController: (cb) => { | |
require.ensure([], (require) => { | |
cb(require('./ExampleController').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 React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import ObjectStateStorage from 'object-state-storage'; | |
class Session { | |
constructor(mountPoint, controllers) { | |
if (!mountPoint) { | |
throw new Error('"mountPoint" property is not defined'); | |
} |
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 { injectDeps } from 'components-di'; | |
import RootComponent from '../../ui/views/Example'; | |
class ExampleController { | |
constructor(initialState, context) { | |
// context has store reference and a function to replace controller | |
this._context = context; | |
this._context.store.resetState(initialState); | |
this._view = injectDeps(this.context, this.actions)(RootComponent); | |
} |
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
// utility function, tests if provided item is a key-value object and not an array | |
const isObject = item => typeof item === 'object' && item !== null && !Array.isArray(item); | |
// utility function, clones key-value objects | |
export const clone = (item) => JSON.parse(JSON.stringify(item)); | |
// utility function, recursively merges key-value objects | |
export const merge = (to, from) => { |
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 React from 'react'; | |
import hoistStatics from 'hoist-non-react-statics'; | |
const getDisplayName = Component => ( | |
Component.displayName || Component.name || 'Component' | |
); | |
const isObject = item => typeof item === 'object' && item !== null && !Array.isArray(item); | |
// creates a new actions list with initial context argument set |
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
{ | |
"presets": [ | |
["latest", { "es2015": { "modules": false } }], | |
["react"], | |
["env", { | |
"useBuiltIns": true, | |
"debug": false, | |
"targets": { | |
"browsers": ["last 3 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
{ | |
"plugins": ["import", "jsx-a11y", "react"], | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true, | |
"jest": true, | |
"node": true | |
}, |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |