Permalink
Browse files

Initial Commit

  • Loading branch information...
0 parents commit 3c91b9e5b1748abc5e4a7011e7237f06a1e2be15 @edubkendo committed Jun 25, 2012
@@ -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
+
+# NPM packages folder.
+node_modules/
+
+# Brunch folder for temporary files.
+tmp/
+
+public/
@@ -0,0 +1,74 @@
+# Brunch with Ember
+This is a simple ember skeleton for [Brunch](http://brunch.io/) with working and up to date handlebars pre-compilng :)
+
+## Getting started
+
+Clone the repo and run `npm install` & `brunch build`.
+See more info on the [official site](http://brunch.io)
+
+## Usage
+
+ git clone git://github.com/icholy/ember-brunch.git -b coffee
+ brunch new myapp -s ./ember-brunch/
+
+>>>>>>> origin/coffee
+## Overview
+
+ config.coffee
+ server.coffee
+ package.json
+ README.md
+ /app/
+ assets/
+ index.html
+ img/
+ glyphicons-halflings-white.png
+ glyphicons-halflings.png
+ styles/
+ templates/
+ models/
+ views/
+ controllers/
+ templates.coffee
+ models.coffee
+ views.coffee
+ controllers.coffee
+ app.coffee
+ initialize.coffee
+ /vendor/
+ scripts/
+ jquery.js
+ console-helper.js
+ ember-latest.js
+ ember-data-latest.js
+ handlebars-1.0.0.beta.6.js
+ bootstrap.js
+ styles/
+ bootstrap.css
+ /public/
+ img/
+ stylesheets/
+ javascripts/
+ /test/
+ spec.coffee
+ /generators/
+ model.coffee
+ view.coffee
+ controller.coffee
+
+* `config.coffee` contains your app configuration. This is where you configure what Plugins / Languages to use and what rules are applied to them.
+* `app/` and subdirectories (excluding `app/assets`) contains files that are to be compiled. Javascript files, or files that compile to JS (coffeescript, roy etc.), are automatically wrapped as commonjs style modules so they can be loaded via `require('module/location')`.
+* `app/assets` contains images / static files. The contents of the directory are copied to `public/` without any modification.
+* `app/templates.coffee`, `app/models.coffee`, `app/views.coffee`, and `app/controllers.coffee` are loaded in `initialize.coffee` and are responsible for loading their respective classes.
+* `test/` contains unit tests.
+* `vendor/` contains all third-party code. The code wouldn’t be wrapped in
+modules, it would be loaded instantly instead.
+
+The generated output is placed in the `public/` (by default) directory when `brunch build` or `brunch watch` is executed.
+
+## Other
+Software Versions used:
+
+* jQuery 1.7.2
+* Ember latest (master)
+* Bootstrap 2.0.4
@@ -0,0 +1,8 @@
+# Application bootstrapper
+
+App = Em.Application.create
+ Views : Em.Namespace.create()
+ Models : Em.Namespace.create()
+ Controllers : Em.Namespace.create()
+
+module.exports = App
No changes.
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.
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Title</title>
+ <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>
@@ -0,0 +1,2 @@
+# load all your controllers here
+
No changes.
@@ -0,0 +1,11 @@
+
+window.App = require 'app'
+
+require 'templates'
+require 'models'
+require 'controllers'
+require 'views'
+
+App.reopen
+ ready: ->
+ this._super()
@@ -0,0 +1 @@
+# load all your models here
No changes.
No changes.
@@ -0,0 +1,2 @@
+# load all your templates here
+
No changes.
@@ -0,0 +1 @@
+# load all your views here
No changes.
@@ -0,0 +1,48 @@
+fs = require 'fs'
+path = require 'path'
+
+# See docs at http://brunch.readthedocs.org/en/latest/config.html.
+
+exports.config =
+
+ files:
+ javascripts:
+ defaultExtension: 'coffee',
+ joinTo:
+ 'javascripts/app.js': /^app/
+ 'javascripts/vendor.js': /^vendor/
+
+ order:
+ before: [
+ 'vendor/scripts/console-helper.js',
+ 'vendor/scripts/jquery-1.7.2.js',
+ 'vendor/scripts/handlebars-1.0.0.beta.6.js',
+ 'vendor/scripts/ember-latest.js',
+ 'vendor/scripts/ember-data-latest.js',
+ 'vendor/scripts/bootstrap.js'
+ ]
+
+ stylesheets:
+ defaultExtension: 'css'
+ joinTo: 'stylesheets/app.css'
+ order:
+ before: ['vendor/styles/bootstrap.css']
+
+ templates:
+ precompile: true
+ defaultExtension: 'hbs'
+ joinTo: 'javascripts/app.js' : /^app/
+
+ server:
+ #path: 'server.coffee'
+ port: 3333
+ base: '/'
+ run: no
+
+ generators:
+ model: (name)->
+ fs.readFileSync(path.join(__dirname, 'generators', 'model.coffee')).toString().replace("\#{name}", name)
+ view: (name)->
+ fs.readFileSync(path.join(__dirname, 'generators', 'view.coffee')).toString().replace("\#{name}", name)
+ controller: (name)->
+ fs.readFileSync(path.join(__dirname, 'generators', 'controller.coffee')).toString().replace("\#{name}", name)
@@ -0,0 +1,5 @@
+App = require 'app'
+
+module.exports = App.Controllers.#{name} = Em.Object.extend
+ init: ->
+ this._super();
@@ -0,0 +1,5 @@
+App = require 'app'
+
+module.exports = App.Models.#{name} = Em.Object.extend
+ init: ->
+ this._super()
@@ -0,0 +1,5 @@
+App = require 'app'
+
+module.exports = App.Views.#{name} = Em.View.extend
+ init: ->
+ this._super()
@@ -0,0 +1,30 @@
+{
+ "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.3",
+ "coffee-script-brunch": "> 1.0 < 1.3",
+ "css-brunch": "> 1.0 < 1.3",
+ "uglify-js-brunch": "> 1.0 < 1.3",
+ "clean-css-brunch": "> 1.0 < 1.3",
+ "ember-handlebars-brunch": "git://github.com/icholy/ember-handlebars-brunch.git"
+ },
+ "devDependencies": {
+ "mocha": "0.14.0",
+ "expect.js": "0.1.2",
+ "express": "2.5.8"
+ }
+}
@@ -0,0 +1,18 @@
+express = require 'express'
+
+exports.startServer = (port, path, callback = (->)) ->
+
+ server = express.createServer()
+
+ server.configure ->
+ server.use express.static path
+ server.set 'views', path
+ server.set 'view options', layout: no
+ server.register '.html', compile: (str, options) ->
+ (locals) -> str
+
+ server.get '/', (req, res) ->
+ res.render 'index.html'
+
+ server.listen parseInt port, 10
+ server.on 'listening', callback
@@ -0,0 +1 @@
+# Write your [mocha](http://visionmedia.github.com/mocha/) specs here.
Oops, something went wrong.

0 comments on commit 3c91b9e

Please sign in to comment.