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
<!DOCTYPE html> | |
<html ng-app="app"> | |
<head> | |
<script src="http://code.angularjs.org/1.2.0-rc.2/angular.js"></script> | |
<script src="http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js"></script> | |
</head> | |
<body> | |
<div ui-view></div> |
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
/** | |
* Simple function to determine scrollbar width. | |
* Extracted from JqueryUI source and changed to get rid | |
* of jQuery dependency. | |
*/ | |
function getScrollBarWidth() { | |
var w1, w2, | |
div = document.createElement('div'), | |
inner = document.createElement('div'); | |
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'; | |
angular | |
.module('Decorators', []) | |
.config(function($provide){ | |
/** | |
* Change $watchCollection due to bug #2621 | |
* https://github.com/angular/angular.js/issues/2621 | |
* remove after official fix | |
*/ |
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 Router from 'react-router'; | |
import routes from './routes'; | |
import { createStore, combineReducers } from 'redux'; | |
import { Provider } from 'react-redux'; | |
import intlReducer from './intl/intl.reducer' | |
const app = document.getElementById('app'); | |
/** initalState contains very complicated object with all translations */ |
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
{ | |
foo: "bar", | |
bar: "baz", | |
tmp: "test", | |
} |
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
{ | |
foo: "bar", | |
bar: "baz", | |
tmp: "test" | |
} |
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'; | |
const path = require('path'); | |
const sassAndScssLoader = indentedSyntax => ( | |
(source, filename) => require('node-sass').renderSync({ | |
file: filename, | |
indentedSyntax | |
}).css | |
); |
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 imports from './imports'; // <-- all your imports | |
import express from 'express'; | |
const app = express(); | |
if (__DEVELOPMENT__) require('./serverHotReload')(app, () => { | |
try { | |
imports = require('./imports'); | |
} catch (error) { | |
console.log(error.stack) |
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 createLogger from 'redux-logger'; | |
const actionTransformer = action => { | |
if (action.type === 'BATCHING_REDUCER.BATCH') { | |
action.payload.type = action.payload.reduce((result, next) => { | |
const prefix = result ? result + ' => ' : ''; | |
return prefix + next.type; | |
}, ''); | |
return action.payload; |
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 injectMiddleware = (staticDeps, dynamicDeps) => ({ dispatch, getState }) => next => action => { | |
const deps = {...staticDeps}; | |
Object.keys(dynamicDeps).forEach(key => { | |
deps[key] = dynamicDeps[key](); | |
}); | |
return next(typeof action === 'function' | |
? action({ ...deps, dispatch, getState }) | |
: action | |
); | |
} |
OlderNewer