Permalink
Browse files

Lots of changes:

- Removed custom classes for backbone views, models and collections (to keep it simple).
- Fixed testing with karma-runner (run: cake test).
- Updated libraries.
- Updated brunch plugins versions.
- Updated docs (needs docs for generators).
- Initi router outside of jquery document ready callback (for optimization).
  • Loading branch information...
1 parent 2755050 commit 55858c11a2afa244e77011a0bca940dad899b198 @elving committed Apr 1, 2013
Showing with 8,332 additions and 524 deletions.
  1. +5 −0 Cakefile
  2. +13 −1 README.md
  3. +154 −154 app/assets/404.html
  4. BIN app/assets/apple-touch-icon-114x114-precomposed.png
  5. BIN app/assets/apple-touch-icon-144x144-precomposed.png
  6. BIN app/assets/apple-touch-icon-57x57-precomposed.png
  7. BIN app/assets/apple-touch-icon-72x72-precomposed.png
  8. BIN app/assets/apple-touch-icon-precomposed.png
  9. BIN app/assets/apple-touch-icon.png
  10. BIN app/assets/favicon.ico
  11. BIN app/assets/images/glyphicons-halflings-white.png
  12. BIN app/assets/images/glyphicons-halflings.png
  13. +3 −3 app/assets/index.html
  14. +5 −13 app/initialize.coffee
  15. +0 −19 app/lib/app_helpers.coffee
  16. +0 −3 app/lib/collection.coffee
  17. +4 −0 app/lib/helpers.coffee
  18. +0 −93 app/lib/model.coffee
  19. +0 −98 app/lib/view.coffee
  20. +0 −3 app/routers/app_router.coffee
  21. +10 −0 app/routers/main.coffee
  22. +0 −10 app/views/app_view.coffee
  23. +5 −0 app/views/index.coffee
  24. +1 −11 app/views/styles/_base.styl
  25. +0 −35 app/views/styles/_states.styl
  26. +0 −48 app/views/styles/_ui.styl
  27. +0 −2 app/views/styles/application.styl
  28. +8 −6 config.coffee
  29. +10 −12 package.json
  30. +5 −0 test/helpers.coffee
  31. +57 −0 test/karma.conf.js
  32. +0 −1 test/spec.coffee
  33. +0 −4 test/test-helpers.coffee
  34. +3,767 −0 test/vendor/scripts/chai-1.4.0.js
  35. +4,153 −0 test/vendor/scripts/sinon-1.5.2.js
  36. +106 −0 test/vendor/scripts/sinon-chai-2.2.0.js
  37. +5 −0 test/vendor/scripts/test-helper.js
  38. +0 −8 test/views/app_view_test.coffee
  39. +8 −0 test/views/index_test.coffee
  40. +13 −0 vendor/scripts/console-polyfill.js
View
@@ -0,0 +1,5 @@
+task 'test', ->
+ server = (require 'karma').server
+ server.start configFile: './test/karma.conf.js', (exitCode) ->
+ console.log "Karma has exited with #{exitCode}"
+ process.exit exitCode
View
@@ -18,7 +18,7 @@ Brunch with Hipsters is a rad [Brunch](http://brunch.io/) app skeleton that come
- [Modernizr v2.6.2](https://github.com/Modernizr/Modernizr)
- [Brunch Auto-Reload v1.3.2](https://github.com/brunch/auto-reload-brunch)
- [Lodash v1.0.1](https://github.com/bestiejs/lodash)
-- [HTML5 Boilerplate v3.0.0](https://github.com/h5bp/html5-boilerplate)
+- [HTML5 Boilerplate v4.1.0](https://github.com/h5bp/html5-boilerplate)
- [Coffeelint 1.4.4](https://github.com/ilkosta/coffeelint-brunch)
## Getting started
@@ -35,3 +35,15 @@ or
or
$ git clone git@github.com:elving/brunch-with-hipsters.git && npm install && brunch w -s
+
+## Testing
+
+To run your tests using (https://github.com/karma-runner)[Karma] you will need to install phantomJS:
+
+ brew install phantomjs
+
+To run the tests just:
+
+ cake test
+
+You can change Karma's configuration by editing `test/karma.conf.js` and add any test helpers by editing `test/helpers.coffee`.
View
@@ -1,157 +1,157 @@
<!DOCTYPE html>
<html lang="en">
-<head>
- <meta charset="utf-8">
- <title>Page Not Found :(</title>
- <style>
- ::-moz-selection {
- background: #b3d4fc;
- text-shadow: none;
- }
-
- ::selection {
- background: #b3d4fc;
- text-shadow: none;
- }
-
- html {
- padding: 30px 10px;
- font-size: 20px;
- line-height: 1.4;
- color: #737373;
- background: #f0f0f0;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
- }
-
- html,
- input {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- }
-
- body {
- max-width: 500px;
- _width: 500px;
- padding: 30px 20px 50px;
- border: 1px solid #b3b3b3;
- border-radius: 4px;
- margin: 0 auto;
- box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
- background: #fcfcfc;
- }
-
- h1 {
- margin: 0 10px;
- font-size: 50px;
- text-align: center;
- }
-
- h1 span {
- color: #bbb;
- }
-
- h3 {
- margin: 1.5em 0 0.5em;
- }
-
- p {
- margin: 1em 0;
- }
-
- ul {
- padding: 0 0 0 40px;
- margin: 1em 0;
- }
-
- .container {
- max-width: 380px;
- _width: 380px;
- margin: 0 auto;
- }
-
- /* google search */
-
- #goog-fixurl ul {
- list-style: none;
- padding: 0;
- margin: 0;
- }
-
- #goog-fixurl form {
- margin: 0;
- }
-
- #goog-wm-qt,
- #goog-wm-sb {
- border: 1px solid #bbb;
- font-size: 16px;
- line-height: normal;
- vertical-align: top;
- color: #444;
- border-radius: 2px;
- }
-
- #goog-wm-qt {
- width: 220px;
- height: 20px;
- padding: 5px;
- margin: 5px 10px 0 0;
- box-shadow: inset 0 1px 1px #ccc;
- }
-
- #goog-wm-sb {
- display: inline-block;
- height: 32px;
- padding: 0 10px;
- margin: 5px 0 0;
- white-space: nowrap;
- cursor: pointer;
- background-color: #f5f5f5;
- background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- *overflow: visible;
- *display: inline;
- *zoom: 1;
- }
-
- #goog-wm-sb:hover,
- #goog-wm-sb:focus {
- border-color: #aaa;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
- background-color: #f8f8f8;
- }
-
- #goog-wm-qt:hover,
- #goog-wm-qt:focus {
- border-color: #105cb6;
- outline: 0;
- color: #222;
- }
-
- input::-moz-focus-inner {
- padding: 0;
- border: 0;
- }
- </style>
-</head>
-<body>
- <div class="container">
- <h1>Not found <span>:(</span></h1>
- <p>Sorry, but the page you were trying to view does not exist.</p>
- <p>It looks like this was the result of either:</p>
- <ul>
- <li>a mistyped address</li>
- <li>an out-of-date link</li>
- </ul>
- <script>
- var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
- </script>
- <script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
- </div>
-</body>
+ <head>
+ <meta charset="utf-8">
+ <title>Page Not Found :(</title>
+ <style>
+ ::-moz-selection {
+ background: #b3d4fc;
+ text-shadow: none;
+ }
+
+ ::selection {
+ background: #b3d4fc;
+ text-shadow: none;
+ }
+
+ html {
+ padding: 30px 10px;
+ font-size: 20px;
+ line-height: 1.4;
+ color: #737373;
+ background: #f0f0f0;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+ }
+
+ html,
+ input {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ }
+
+ body {
+ max-width: 500px;
+ _width: 500px;
+ padding: 30px 20px 50px;
+ border: 1px solid #b3b3b3;
+ border-radius: 4px;
+ margin: 0 auto;
+ box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
+ background: #fcfcfc;
+ }
+
+ h1 {
+ margin: 0 10px;
+ font-size: 50px;
+ text-align: center;
+ }
+
+ h1 span {
+ color: #bbb;
+ }
+
+ h3 {
+ margin: 1.5em 0 0.5em;
+ }
+
+ p {
+ margin: 1em 0;
+ }
+
+ ul {
+ padding: 0 0 0 40px;
+ margin: 1em 0;
+ }
+
+ .container {
+ max-width: 380px;
+ _width: 380px;
+ margin: 0 auto;
+ }
+
+ /* google search */
+
+ #goog-fixurl ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ }
+
+ #goog-fixurl form {
+ margin: 0;
+ }
+
+ #goog-wm-qt,
+ #goog-wm-sb {
+ border: 1px solid #bbb;
+ font-size: 16px;
+ line-height: normal;
+ vertical-align: top;
+ color: #444;
+ border-radius: 2px;
+ }
+
+ #goog-wm-qt {
+ width: 220px;
+ height: 20px;
+ padding: 5px;
+ margin: 5px 10px 0 0;
+ box-shadow: inset 0 1px 1px #ccc;
+ }
+
+ #goog-wm-sb {
+ display: inline-block;
+ height: 32px;
+ padding: 0 10px;
+ margin: 5px 0 0;
+ white-space: nowrap;
+ cursor: pointer;
+ background-color: #f5f5f5;
+ background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ *overflow: visible;
+ *display: inline;
+ *zoom: 1;
+ }
+
+ #goog-wm-sb:hover,
+ #goog-wm-sb:focus {
+ border-color: #aaa;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ background-color: #f8f8f8;
+ }
+
+ #goog-wm-qt:hover,
+ #goog-wm-qt:focus {
+ border-color: #105cb6;
+ outline: 0;
+ color: #222;
+ }
+
+ input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container">
+ <h1>Not found <span>:(</span></h1>
+ <p>Sorry, but the page you were trying to view does not exist.</p>
+ <p>It looks like this was the result of either:</p>
+ <ul>
+ <li>a mistyped address</li>
+ <li>an out-of-date link</li>
+ </ul>
+ <script>
+ var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
+ </script>
+ <script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
+ </div>
+ </body>
</html>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Binary file not shown.
Deleted file not rendered
Deleted file not rendered
@@ -18,7 +18,7 @@
window.brunch['auto-reload'] = { enabled: true };
</script>
- <script src="javascripts/modernizr.js"></script>
+ <script src="scripts/modernizr.js"></script>
<link rel="stylesheet" href="stylesheets/app.css">
</head>
@@ -30,8 +30,8 @@
<!-- Your Markup -->
- <script src="javascripts/vendor.js" defer></script>
- <script src="javascripts/app.js" defer onload="require('initialize');"></script>
+ <script src="scripts/vendor.js" defer></script>
+ <script src="scripts/app.js" defer onload="require('initialize');"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
View
@@ -1,17 +1,9 @@
-# App Namespace
-# Change `Hipster` to your app's name
-@Hipster ?= {}
-Hipster.Routers ?= {}
-Hipster.Views ?= {}
-Hipster.Models ?= {}
-Hipster.Collections ?= {}
+# Load App Helpers
+require 'lib/helpers'
-$ ->
- # Load App Helpers
- require 'lib/app_helpers'
-
- # Initialize App
- Hipster.Views.AppView = new AppView = require 'views/app_view'
+# Initialize Router
+require 'routers/main'
+$ ->
# Initialize Backbone History
Backbone.history.start pushState: yes
Oops, something went wrong.

0 comments on commit 55858c1

Please sign in to comment.