This file contains hidden or 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
# Dockerfile to run node app | |
# VERSION 1 - EDITION 2 | |
# Base image used is Ubuntu 14.04 LTS | |
FROM ubuntu:14.04 | |
MAINTAINER me | |
# Install wget | |
RUN apt-get update && apt-get install -y \ |
This file contains hidden or 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'; | |
//External | |
var Reflux = require('reflux'); | |
//Local | |
var CommentActions = require('./CommentActions'); | |
var CommentStore = Reflux.createStore({ |
This file contains hidden or 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
// converts commonJS requires to es6 imports | |
// var foo = require('foo'); | |
// -> | |
// import foo from 'foo'; | |
// | |
// jscodeshift -t requiresToImports.js src/**/*.js* | |
'use strict'; | |
module.exports = function(fileInfo, api) { | |
var j = api.jscodeshift; |
This file contains hidden or 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
ReactSiteConfiguration.Configuration.AddScriptWithoutTransform("~/wwwroot/ng-server.bundle.js"); | |
ReactSiteConfiguration.Configuration.JsonSerializerSettings = new Newtonsoft.Json.JsonSerializerSettings | |
{ | |
ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore, | |
}; | |
// Don't use slower IE engine | |
ReactSiteConfiguration.Configuration.AllowMsieEngine = false; |
This file contains hidden or 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
// Example of usage | |
import { selectors } from './rootReducer'; | |
import { selectors } from '../../reducers/rootReducer'; | |
const mapStateToProps = (state: State, ownProps: any) => ({ | |
theseObjects: selectors.getTheseObjects(state), | |
thoseObjects: selectors.getThoseObjects(state), | |
showSomethinginUi: selectors.getSomethingFromUiSelectors(state), |
OlderNewer