mix phoenix.new turn_tracker --sup
npm install --save react react-dom
mix phoenix.server
Created
January 3, 2016 20:35
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
// Brunch automatically concatenates all files in your | |
// watched paths. Those paths can be configured at | |
// config.paths.watched in "brunch-config.js". | |
// | |
// However, those files will only be executed if | |
// explicitly imported. The only exception are files | |
// in vendor, which are never wrapped in imports and | |
// therefore are always executed. | |
// Import dependencies | |
// | |
// If you no longer want to use a dependency, remember | |
// to also remove its path from "config.paths.watched". | |
import "deps/phoenix_html/web/static/js/phoenix_html"; | |
// Import local files | |
// | |
// Local files can be imported directly using relative | |
// paths "./socket" or full ones "web/static/js/socket". | |
// import socket from "./socket" | |
import React from "react"; | |
import ReactDom from "react-dom"; | |
ReactDOM.render( | |
<h1>Hello, world!</h1>, | |
document.getElementById('example') | |
); |
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
¶ ~/src/react/turn_tracker $ mix phoenix.server | |
[info] Running TurnTracker.Endpoint with Cowboy using http on port 4000 | |
03 Jan 15:25:00 - error: Compiling of web/static/js/app.js failed. web/static/js/app.js: Unexpected token (26:4) |
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
{ | |
"repository": {}, | |
"dependencies": { | |
"babel-brunch": "^6.0.0", | |
"brunch": "^2.0.0", | |
"clean-css-brunch": ">= 1.0 < 1.8", | |
"css-brunch": ">= 1.0 < 1.8", | |
"javascript-brunch": ">= 1.0 < 1.8", | |
"react": "^0.14.5", | |
"react-dom": "^0.14.5", | |
"uglify-js-brunch": ">= 1.0 < 1.8" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment