Skip to content

Commit

Permalink
Improve UX.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Feb 7, 2017
1 parent 3192874 commit 758dec3
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 57 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Clone this repo manually or use `brunch new dir -s brunch/with-react`
* [Brunch](http://brunch.io): `npm install -g brunch`
* Brunch plugins and app dependencies: `npm install`
* Run:
* `brunch watch --server` — watches the project with continuous rebuild. This will also launch HTTP server with [pushState](https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history).
* `brunch build --production` — builds minified project for production
* `npm start` — watches the project with continuous rebuild. This will also launch HTTP server with [pushState](https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Manipulating_the_browser_history).
* `npm run build` — builds minified project for production
* Learn:
* `public/` dir is fully auto-generated and served by HTTP server. Write your code in `app/` dir.
* Place static files you want to be copied from `app/assets/` to `public/`.
Expand Down
30 changes: 15 additions & 15 deletions app/assets/index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<title>Brunch with React</title>
<link rel="stylesheet" type="text/css" href="/app.css">
<script src="/vendor.js"></script>
<script src="/app.js"></script>
<script>require('initialize');</script>
</head>
<body>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width" />
<title>Brunch</title>
<link rel="stylesheet" type="text/css" href="/app.css">
<script src="/vendor.js"></script>
<script src="/app.js"></script>
<script>require('initialize');</script>
</head>
<body>
<div class="brunch">
<a href="http://brunch.io"><img src="http://brunch.io/images/logo.png" alt="Brunch" /></a>
<p>Bon Appétit.</p>
<div id="app"></div>
</body>
</html>
</div>
</body>
7 changes: 1 addition & 6 deletions app/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ export default class App extends React.Component {
render() {
return (
<div id="content">
<h1>&nbsp;</h1>
<h2>Welcome!</h2>
<ul>
<li><a href="http://brunch.io">Brunch homepage</a></li>
<li><a href="https://facebook.github.io/react/">React.js homepage</a></li>
</ul>
<h5>Time to <a href="https://facebook.github.io/react/">React</a>.</h5>
</div>
);
}
Expand Down
26 changes: 9 additions & 17 deletions app/styles/application.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
* {
box-sizing: border-box;
font-family: -apple-system, system, sans-serif;
}

#content {
width: 480px;
margin: 0 auto;
}

h1 {
margin-bottom: 0.5em;
font-size: 5em;
background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22200%22%20height%3D%2275%22%3E%3Cpath%20fill%3D%22%233F894A%22%20d%3D%22M24.819%2052.086c-.075-1.002-.354-2.099-1.461-3.109l-.005-.004-.137-.122-.016-.013c-1.532-1.399-2.756-4.088-2.756-6.943%200-3.98%201.763-15.292%202.144-15.292.302%200%20.308%205.456.108%2010.585-.139%203.562.388%204.965%201.238%204.965%201.132%200%201.313-3.585%201.43-7.615.096-3.318.386-7.91.618-7.935h.001c.362%200%20.661%204.563.758%207.889.12%204.13.406%207.559%201.352%207.559.993%200%201.295-1.586%201.225-5.107-.086-4.298-.087-10.341.215-10.341.381%200%201.674%203.971%201.986%2015.292.079%202.853-1.224%205.543-2.757%206.943l-.016.013-.137.122-.005.004c-1.108%201.01-1.386%202.107-1.462%203.109-.12%201.6-.174%203.65-.168%205.957l8.726%208.726c.122-3.803.11-7.39-.058-10.098-.063-1.012-.218-2.187-.395-3.124-.055-.299-.247-.575-.247-.812v-32.965c0-2.812%202.633-4.141%205.055%202.031%202.422%206.172%201.746%2028.122%201.746%2029.683%200%20.331-.287.722-.758%201.107-.188.122-.352.245-.51.371-1.451%201.164-1.658%202.506-1.734%203.709-.181%202.912-.327%206.84-.365%2010.961l12.026-12.026c-.017-1.413-.056-2.684-.122-3.743-.025-.406-.126-.819-.203-1.254-.218-1.232-1.743-2.241-2.625-3.127-1.714-1.721-2.816-4.614-2.816-7.876%200-5.297%202.936-12.002%206.558-12.002s6.559%206.704%206.559%2012.002c0%203.262-1.102%206.156-2.816%207.876-.883.886-2.408%201.895-2.626%203.127-.077.436-.178.848-.203%201.254-.04.637-.069%201.355-.091%202.129l16.801-16.802-31.377-31.377-31.377%2031.377%2018.853%2018.853c-.021-1.493-.072-2.837-.156-3.957z%22%2F%3E%3Cg%20fill%3D%22%23333%22%3E%3Cpath%20d%3D%22M84.654%2025.138h7.344c.96%200%201.932.078%202.916.234.983.156%201.866.48%202.646.972.779.492%201.415%201.176%201.907%202.052.492.876.738%202.034.738%203.474%200%201.296-.384%202.424-1.152%203.384-.768.96-1.907%201.597-3.42%201.908v.072c.84.072%201.608.27%202.305.594.695.324%201.296.755%201.8%201.295s.894%201.183%201.17%201.926c.275.744.414%201.561.414%202.448%200%201.465-.282%202.658-.846%203.582-.564.925-1.272%201.65-2.124%202.178-.853.528-1.776.889-2.772%201.08-.996.192-1.926.288-2.79.288h-8.136v-25.487zm2.376%2011.015h4.932c1.225%200%202.22-.149%202.988-.45.768-.3%201.368-.666%201.8-1.098s.72-.894.864-1.386c.144-.492.216-.942.216-1.35%200-.888-.15-1.626-.45-2.214-.3-.587-.702-1.056-1.206-1.404-.504-.348-1.092-.594-1.764-.738s-1.381-.216-2.124-.216h-5.256v8.856zm0%2012.312h5.436c1.392%200%202.514-.167%203.366-.504.852-.336%201.506-.756%201.962-1.26s.762-1.038.918-1.602c.156-.564.234-1.074.234-1.53%200-.937-.181-1.74-.54-2.412-.36-.672-.828-1.218-1.404-1.638s-1.23-.726-1.962-.918c-.732-.192-1.471-.288-2.214-.288h-5.796v10.152zM105.915%2038.673c0-.312-.013-.689-.036-1.133-.024-.444-.042-.894-.054-1.35-.013-.456-.03-.882-.054-1.278s-.036-.702-.036-.918h2.16c.023.624.041%201.224.054%201.8.012.576.042.948.09%201.116.552-.984%201.26-1.788%202.124-2.412.864-.624%201.92-.936%203.168-.936.216%200%20.426.018.63.054l.63.126-.252%202.124c-.288-.096-.563-.144-.828-.144-.936%200-1.745.15-2.43.45-.684.3-1.248.714-1.692%201.242-.444.528-.773%201.146-.989%201.854s-.324%201.47-.324%202.286v9.071h-2.16v-11.952zM131.694%2045.945c0%20.312.012.69.036%201.134.023.444.041.895.054%201.351.012.456.03.882.054%201.277.024.396.036.702.036.918h-2.16c-.023-.624-.042-1.224-.054-1.8-.013-.576-.042-.948-.09-1.116h-.108c-.432.913-1.151%201.698-2.159%202.358-1.009.66-2.185.99-3.528.99-1.296%200-2.358-.204-3.187-.612-.827-.408-1.476-.941-1.943-1.603-.468-.659-.787-1.422-.954-2.285-.168-.864-.252-1.752-.252-2.664v-9.9h2.16v9.792c0%20.672.06%201.326.18%201.962.12.637.329%201.206.63%201.71.3.504.72.906%201.26%201.206.54.301%201.242.45%202.106.45.792%200%201.542-.138%202.25-.414.707-.275%201.319-.695%201.836-1.26.516-.563.924-1.272%201.224-2.124s.45-1.854.45-3.006v-8.316h2.16v11.952zM136.95%2038.673c0-.312-.013-.689-.036-1.133-.024-.444-.042-.894-.054-1.35-.013-.456-.03-.882-.054-1.278s-.036-.702-.036-.918h2.16c.023.624.041%201.224.054%201.8.012.576.042.948.09%201.116h.108c.432-.912%201.151-1.698%202.16-2.358%201.008-.66%202.184-.99%203.527-.99%201.296%200%202.352.204%203.168.612.815.409%201.458.942%201.926%201.602.469.661.792%201.422.973%202.286.18.863.27%201.752.27%202.664v9.899h-2.16v-9.792c0-.672-.06-1.325-.18-1.962-.12-.636-.33-1.206-.63-1.709-.301-.504-.72-.906-1.26-1.206-.54-.3-1.242-.45-2.106-.45-.792%200-1.542.139-2.25.414-.708.276-1.32.696-1.836%201.26-.517.564-.924%201.271-1.224%202.124-.301.852-.45%201.854-.45%203.006v8.315h-2.16v-11.952zM170.186%2048.177c-.815.984-1.74%201.711-2.771%202.179-1.032.468-2.148.702-3.348.702-1.272%200-2.448-.217-3.528-.648s-2.004-1.038-2.772-1.818c-.768-.779-1.367-1.703-1.8-2.771-.432-1.067-.647-2.237-.647-3.51s.216-2.442.647-3.511c.433-1.067%201.032-1.991%201.8-2.771.769-.779%201.692-1.386%202.772-1.818s2.256-.648%203.528-.648c1.224%200%202.357.252%203.401.756s1.974%201.212%202.79%202.124l-1.728%201.296c-.625-.696-1.309-1.242-2.053-1.638s-1.548-.594-2.411-.594c-1.009%200-1.921.18-2.736.54-.816.36-1.512.846-2.088%201.458s-1.015%201.332-1.314%202.16-.45%201.71-.45%202.646c0%20.936.15%201.817.45%202.646s.738%201.548%201.314%202.16%201.271%201.098%202.088%201.458c.815.36%201.728.54%202.736.54.911%200%201.746-.21%202.502-.63s1.409-.978%201.962-1.674l1.656%201.366zM173.191%2023.41h2.16v13.5h.072c.432-.912%201.151-1.698%202.16-2.358%201.008-.66%202.184-.99%203.527-.99%201.296%200%202.352.204%203.168.612.815.409%201.458.942%201.926%201.602.469.661.792%201.422.973%202.286.18.863.27%201.752.27%202.664v9.899h-2.16v-9.792c0-.672-.06-1.325-.18-1.962-.12-.636-.33-1.206-.63-1.709-.301-.504-.72-.906-1.26-1.206-.54-.3-1.242-.45-2.106-.45-.792%200-1.542.139-2.25.414-.708.276-1.32.696-1.836%201.26-.517.564-.924%201.271-1.224%202.124-.301.852-.45%201.854-.45%203.006v8.315h-2.16v-27.215z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E');
background-repeat: no-repeat;
background-position: 2px;
.brunch {
font-family: -apple-system, Sans-Serif;
text-align: center;
font-size: 24pt;
color: #3f894a;
}

a {
Expand All @@ -24,5 +13,8 @@ a {

a:hover {
color: #27552e;
border-bottom: 1px solid #27552e;
}

h5 > a {
text-decoration: underline;
}
7 changes: 4 additions & 3 deletions brunch-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
exports.files =
// See http://brunch.io for documentation.
exports.files = {
javascripts: {
joinTo: {
'vendor.js': /^(?!app)/,
Expand All @@ -8,6 +9,6 @@ exports.files =
stylesheets: {joinTo: 'app.css'}
};

exports.plugins =
babel: {presets: ['es2015', 'react']}
exports.plugins = {
babel: {presets: ['latest', 'react']}
};
25 changes: 11 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
{
"name": "your-app",
"description": "Description",
"author": "Your Name",
"name": "brunch-app",
"description": "Brunch.io application",
"private": true,
"author": "Brunch",
"version": "0.0.1",
"repository": {
"type": "git",
"url": ""
},
"repository": "",
"scripts": {
"start": "brunch watch --server",
"prod": "brunch build --production"
"build": "brunch build --production"
},
"dependencies": {
"react": "~15.3.0",
"react-dom": "~15.3.0"
"react": "^15.4",
"react-dom": "^15.4"
},
"devDependencies": {
"auto-reload-brunch": "^2",
"babel-brunch": "~6.0.0",
"babel-preset-es2015": "~6.9.0",
"babel-preset-react": "~6.11.1",
"brunch": "^2",
"babel-brunch": "~6.0",
"babel-preset-latest": "^6",
"babel-preset-react": "~6.22",
"clean-css-brunch": "^2",
"uglify-js-brunch": "^2"
}
Expand Down

0 comments on commit 758dec3

Please sign in to comment.