npm install babel-loader imports-loader webpack --save
- Create
webpack.config.js
- Move
index.ios.js
tosrc/index.ios.jsx
webpack --watch
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
#!/bin/sh | |
echo Install all AppStore Apps at first! | |
# no solution to automate AppStore installs | |
read -p "Press any key to continue... " -n1 -s | |
echo '\n' | |
echo Install and Set San Francisco as System Font | |
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
echo Install Homebrew, Postgres, wget and cask | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" |
var lox = require('lib/lox'); | |
lox.start(); | |
lox.exampleOfSendWithoutCallback(); | |
lox.exampleOfSendWithCallback(function(result) { | |
console.log('Got data back! ' + result); | |
}); |
// We'll use cluster to split work across all of our CPUs. | |
var cluster = require('cluster'); | |
// Are we the master process ... | |
if (cluster.isMaster) { | |
// Monitor the workers for failures. | |
cluster.on('exit', function(worker) { | |
console.log('Worker ' + worker.process.pid + ' died. Forking another...'); | |
cluster.fork(); | |
}); |
import { combineReducers } from 'redux'; | |
import users from './reducers/users'; | |
import posts from './reducers/posts'; | |
export default function createReducer(asyncReducers) { | |
return combineReducers({ | |
users, | |
posts, | |
...asyncReducers | |
}); |
Recently I noticed that Safari 10 for Mac/iOS had achieved 100% support for ES6. With that in mind, I began to look at the browser landscape and see how thorough the support in the other browsers. Also, how does that compare to Babel and its core-js
runtime. According to an ES6 compatability table, Chrome, Firefox, and IE Edge have all surpassed what the Babel transpiler can generate in conjunction with runtime polyfills. The Babel/core-js combination achieves 71% support for ES6, which is quite a bit lower than the latest browsers provide.
It made me ask the question, "Do we need to run the babel es2015 preset anymore?", at least if our target audience is using Chrome, Firefox, or Safari.
It's clear that, for now, we can't create a site or application that only serves ES6. That will exclude users of Internet Explorer and various older browsers running on older iOS and Android devices. For example, Safari on iOS 9 has pretty mediocre ES6 support.
# Default Homebrew MySQL server config | |
[mysqld] | |
#interactive_timeout = 300 | |
#wait_timeout = 300 | |
max_allowed_packet=256M | |
table_open_cache=250 | |
# Only allow connections from localhost | |
bind-address = * | |
#skip-networking |