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
const fs = require('fs') | |
const path = require('path') | |
const express = require('express') | |
const compression = require('compression') | |
const bodyParser = require('body-parser') | |
const jwt = require('jsonwebtoken') | |
// Allow CORS | |
const origin = '*' | |
const app = express() |
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
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
devtool: 'eval', | |
entry: [ | |
'react-hot-loader/patch', | |
'webpack-dev-server/client?http://localhost:3000', | |
'webpack/hot/only-dev-server', | |
'./src/hotReload' |
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
const Spinner = () => ( | |
<p>Loading ...</p> | |
) | |
const List = ({items}) => ( | |
<ul> | |
{items.maps((item, i) => <li key={i}>{item.text}</li>)} | |
</ul> | |
) |
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
const get = u => fetch(u).then(r => r.json()) | |
const profile = async() => { | |
let data = await get(url) | |
let { pseudo, email, avatar } = data | |
} | |
// 👉 http://babeljs.io/docs/plugins/transform-runtime/ |
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
sudo sh -c " | |
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add - | |
echo 'deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main' | tee /etc/apt/sources.list.d/dokku.list | |
apt-get update -qq > /dev/null | |
apt-get install sigil -t trusty # We're using the Ubuntu 14.04 package ;) | |
apt-mark hold sigil | |
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh | |
bash bootstrap.sh | |
" |
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
module.exports = { | |
entry: "./src/main.js", | |
output: { | |
path: __dirname + "/src", | |
filename: "bundle.js" | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, |
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
{ | |
"name": "es6", | |
"version": "1.0.0", | |
"description": "My first ES6 project", | |
"main": "main.js", | |
"scripts": { | |
"build": "webpack --optimize-minimize && cp -r src/* cordova/www" | |
}, | |
"author": "Didier Franc", | |
"license": "MIT", |
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
npm init | |
npm install babel-loader babel-core babel-preset-es2015 --save-dev | |
npm install autoroute.js --save | |
echo '{ "presets": ["es2015"] }' > .babelrc | |
cordova create cordova com.example.appname AppName | |
cd cordova | |
cordova platform add ios | |
cordova run ios --device |
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
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install node | |
npm install -g cordova webpack |
NewerOlder