npm install -g webpack
npm install -g create-react-app
create-react-app react-demo
var gulp = require('gulp'), | |
cleanCss = require('gulp-clean-css'), | |
eslint = require('gulp-eslint'), | |
uglify = require('gulp-uglify'), | |
usemin = require('gulp-usemin'), | |
imagemin = require('gulp-imagemin'), | |
// rename = require('gulp-rename'), | |
// concat = require('gulp-concat'), | |
// notify = require('gulp-notify'), | |
cache = require('gulp-cache'), |
'use strict'; | |
module.exports = function(grunt) { | |
// Time how long tasks take. Can help when optimizing build times | |
require('time-grunt')(grunt); | |
// Automatically load required Grunt tasks | |
require('jit-grunt')(grunt, { | |
useminPrepare: 'grunt-usemin' |
npm install --save react react-dom react-router
npm install --save redux react-redux
npm install --save redux-thunk redux-logger
npm install --save normalizr
npm install --save-dev webpack webpack-dev-server
npm install --save-dev babel-core babel-loader babel-preset-es2015 babel-preset-react react-hot-loader
<script> | |
$(document).ready(function() { | |
$('.nav a:not(.dropdown-toggle)').click(function(){ | |
// bootstrap 2.x | |
$('.nav-collapse').collapse('hide'); | |
// bootstrap 3.x | |
$('.navbar-collapse.in').collapse('hide'); | |
}); | |
}; | |
</script> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Slider</title> | |
<link rel="stylesheet" href="styles/style.css"> | |
</head> | |
<body> | |
<div class="wrap"> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Animation</title> | |
<style> | |
body { | |
margin: 0px; | |
background: #000; | |
} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="styles/styles.css"> | |
<title>Fix Image Site</title> | |
</head> | |
<body> | |
<nav></nav> |
// lib/api.js | |
class Api { | |
static headers() { | |
return { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json', | |
'dataType': 'json', | |
} | |
} |
export const getCoordsCurrent = () => (dispatch, getState) => { | |
const promise = new Promise(function(resolve, reject) { | |
navigator.geolocation.getCurrentPosition( | |
response => { | |
dispatch({ | |
type: TYPE.FETCH_CUR_POS_SUCCESS, | |
response | |
}); | |
resolve(); | |
}, |