Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
JoakimLofgren committed Oct 24, 2012
0 parents commit 8e600e8
Show file tree
Hide file tree
Showing 73 changed files with 18,640 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache

# OS or Editor folders
.DS_Store
.cache
.project
.settings
.tmproj
nbproject
Thumbs.db
*.sublime-project
*.sublime-workspace

# NPM packages folder.
node_modules/

# Brunch folder for temporary files.
tmp/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Brunch skeleton based on https://github.com/nezoomie/brunch-eggs-and-bacon
15 changes: 15 additions & 0 deletions app/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Application bootstrapper.
Application = {
initialize: function() {
var HomeView = require('views/home_view');
var Router = require('lib/router');
// Ideally, initialized classes should be kept in controllers & mediator.
// If you're making big webapp, here's more sophisticated skeleton
// https://github.com/paulmillr/brunch-with-chaplin
this.homeView = new HomeView();
this.router = new Router();
if (typeof Object.freeze === 'function') Object.freeze(this);
}
};

module.exports = Application;
Empty file added app/assets/images/.gitkeep
Empty file.
Binary file added app/assets/images/glyphicons-halflings-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/glyphicons-halflings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions app/assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Example brunch application</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="stylesheets/app.css">
<script src="javascripts/vendor.js"></script>
<script src="javascripts/app.js"></script>
<script>require('initialize');</script>
</head>
<body>

</body>
</html>
6 changes: 6 additions & 0 deletions app/initialize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var application = require('application');

$(function() {
application.initialize();
Backbone.history.start();
});
11 changes: 11 additions & 0 deletions app/lib/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var application = require('application');

module.exports = Backbone.Router.extend({
routes: {
'': 'home'
},

home: function() {
$('body').html(application.homeView.render().el);
}
});
1 change: 1 addition & 0 deletions app/lib/view_helper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Put your handlebars.js helpers here.
Empty file added app/models/.gitkeep
Empty file.
4 changes: 4 additions & 0 deletions app/models/collection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Base class for all collections.
module.exports = Backbone.Collection.extend({

});
4 changes: 4 additions & 0 deletions app/models/model.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Base class for all models.
module.exports = Backbone.Model.extend({

});
1 change: 1 addition & 0 deletions app/styles/main.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Add your styles here.
7 changes: 7 additions & 0 deletions app/views/home_view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var View = require('./view');
var template = require('./templates/home');

module.exports = View.extend({
id: 'home-view',
template: template
});
10 changes: 10 additions & 0 deletions app/views/templates/home.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div id="content">
<h1>brunch</h1>
<h2>Welcome!</h2>
<ul>
<li><a href="http://brunch.readthedocs.org/">Documentation</a></li>
<li><a href="https://github.com/brunch/brunch/issues">Github Issues</a></li>
<li><a href="https://github.com/brunch/twitter">Twitter Example App</a></li>
<li><a href="https://github.com/brunch/todos">Todos Example App</a></li>
</ul>
</div>
19 changes: 19 additions & 0 deletions app/views/view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require('lib/view_helper');

// Base class for all views.
module.exports = Backbone.View.extend({
initialize: function() {
this.render = _.bind(this.render, this);
},

template: function() {},
getRenderData: function() {},

render: function() {
this.$el.html(this.template(this.getRenderData()));
this.afterRender();
return this;
},

afterRender: function() {}
});
65 changes: 65 additions & 0 deletions config.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
exports.config =
# Edit the next line to change default build path.
paths:
public: 'public'

files:
javascripts:
# Defines what file will be generated with `brunch generate`.
defaultExtension: 'js'
# Describes how files will be compiled & joined together.
# Available formats:
# * 'outputFilePath'
# * map of ('outputFilePath': /regExp that matches input path/)
# * map of ('outputFilePath': function that takes input path)
joinTo:
'javascripts/app.js': /^app/
'javascripts/vendor.js': /^vendor/
# Defines compilation order.
# `vendor` files will be compiled before other ones
# even if they are not present here.
order:
before: [
'vendor/scripts/console-helper.js',
'vendor/scripts/jquery-1.7.2.js',
'vendor/scripts/underscore-1.3.1.js',
'vendor/scripts/backbone-0.9.2.js',
'vendor/scripts/backbone-mediator.js',

# Twitter Bootstrap jquery plugins
'vendor/scripts/bootstrap/bootstrap-transition.js',
'vendor/scripts/bootstrap/bootstrap-alert.js',
'vendor/scripts/bootstrap/bootstrap-button.js',
'vendor/scripts/bootstrap/bootstrap-carousel.js',
'vendor/scripts/bootstrap/bootstrap-collapse.js',
'vendor/scripts/bootstrap/bootstrap-dropdown.js',
'vendor/scripts/bootstrap/bootstrap-modal.js',
'vendor/scripts/bootstrap/bootstrap-tooltip.js',
'vendor/scripts/bootstrap/bootstrap-popover.js',
'vendor/scripts/bootstrap/bootstrap-scrollspy.js',
'vendor/scripts/bootstrap/bootstrap-tab.js',
'vendor/scripts/bootstrap/bootstrap-typeahed.js'
]

stylesheets:
defaultExtension: 'less'
joinTo: 'stylesheets/app.css'
order:
before: ['vendor/styles/bootstrap/bootstrap.less']

templates:
defaultExtension: 'hbs'
joinTo: 'javascripts/app.js'

# Change this if you're using something other than backbone (e.g. 'ember').
# Content of files, generated with `brunch generate` depends on the setting.
# framework: 'backbone'

# Settings of web server that will run with `brunch watch [--server]`.
# server:
# # Path to your server node.js module.
# # If it's commented-out, brunch will use built-in express.js server.
# path: 'server.coffee'
# port: 3333
# # Run even without `--server` option?
# run: yes
35 changes: 35 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"author": "Your Name",
"name": "package-name",
"description": "Package description",
"version": "0.0.1",
"homepage": "",
"repository": {
"type": "git",
"url": ""
},
"engines": {
"node": "~0.6.10"
},
"scripts": {
"start": "brunch watch --server"
},
"dependencies": {
"javascript-brunch": ">= 1.0 < 1.4",
"less-brunch": ">= 1.0 < 1.4",

"css-brunch": ">= 1.0 < 1.4",

"handlebars-brunch": ">= 1.0 < 1.4",

"uglify-js-brunch": ">= 1.0 < 1.4",
"clean-css-brunch": ">= 1.0 < 1.4",

"auto-reload-brunch": ">= 1.3 < 1.4"
},
"devDependencies": {
"mocha": "0.14.0",
"expect.js": "0.1.2",
"express": "2.5.8"
}
}
1 change: 1 addition & 0 deletions test/spec.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Write your [mocha](http://visionmedia.github.com/mocha/) specs here.
Loading

0 comments on commit 8e600e8

Please sign in to comment.