Giter Site home page Giter Site logo

brunch-with-ember-reloaded's Introduction

Warning

I've stopped using this skeleton and am no longer maintaining this repository. You should try ember-cli.

If you want to take over maintenance of this skeleton let me know @gcollazo

Brunch with Ember Reloaded

build status

A Brunch skeleton for creating ambitious web applications using Ember.js. Based on the official Ember Starter Kit.

Demo

I built a demo app using this skeleton, based on the Building an App with Ember.js video by Tom Dale.

Demo: ember-bloggr

Source: https://github.com/gcollazo/ember-bloggr

Versions

Other versions of this skeleton

Getting started

Before using brunch-with-ember-reloaded you will need to install Brunch.

brunch new gh:gcollazo/brunch-with-ember-reloaded <appname>
cd <appname>
brunch watch -s

Open http://localhost:3333 on your browser.

Generators

This skeleton makes use of scaffolt generators to help you create common files quicker. To use first install scaffolt globally with npm install -g scaffolt. Then you can use the following command to generate files.

scaffolt model <name>             →    app/models/Name.js
scaffolt view <name>              →    app/views/NameView.js
scaffolt controller <name>        →    app/controllers/NameController.js
scaffolt arraycontroller <name>   →    app/controllers/NamesController.js
scaffolt route <name>             →    app/routes/NameRoute.js
scaffolt template <name>          →    app/templatesname.hbs
scaffolt component <name>         →    app/components/NameComponent.js
                                       app/templates/components/name.hbs

There are more commands you can do with scaffolt and also instruction on how to create your own generators, so make sure you check out the docs.

Testing

To run you will need Karma you will need to install phantomjs. If you want to run your tests on other browsers consult the Karma docs.

brew update && brew install phantomjs

To run tests continiously as you write code and tests (for now) you must open two terminal windows.

brunch watch -s
karma start

Building for production

This skeleton supports the production versions of ember and ember-data. Just build using the --production flags.

brunch build --production

You can also have modules load only when you are on a specific environment (production / development). Just add the modules you want loaded to the corresponging subdirectory of the envs top level directory. All modules will be imported by the module 'config/env'.

var myEnvVars = require('config/env');
myEnvVars.envFileName.property;

Updating Ember

To updated ember.js, ember-data.js and handlebars.js to the latest stable versions, just run this command on the project root.

npm run update:ember

Updating Skeleton

This command will replace package.json, README.md, config.js, karma.conf.js and the generators directory with the latest version from the GitHub repository.

npm run update:skeleton
npm install

If you want to update an older version of the skeleton which doesn't have support for the update:skeleton command you can get the setup.js by running:

curl https://raw.github.com/gcollazo/brunch-with-ember-reloaded/master/setup.js > setup.js
node setup.js update:skeleton

License

All of brunch-with-ember-reloaded is licensed under the MIT license.

Copyright (c) 2013 Giovanni Collazo

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

brunch-with-ember-reloaded's People

Contributors

gcollazo avatar jpadilla avatar mutewinter avatar sarus avatar tgkokk avatar walter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

brunch-with-ember-reloaded's Issues

brunch g doesn't work

➤ brunch g model John
`brunch generate / destroy` command was removed.

Use scaffolt (https://github.com/paulmillr/scaffolt)
successor or similar:
    npm install -g scaffolt
    scaffolt <type> <name> [options]
    scaffolt <type> <name> [options] --revert
brunch: no such command 'g'

problem with tests

i doubt this is a bug, more likely a misconfiguration on my part, but when i'm trying to run the tests with karma/testacular, my ember app is not defined. i've set up the karam.confi.js file with

// list of files / patterns to load in the browser
files = [
JASMINE,
JASMINE_ADAPTER,
'public/javascripts/vendor.js',
'public/javascripts/app.js',
'exchange_app/test///*_spec.js',
];

but all of my specs report a ReferenceError of App is not defined. so my global App variable is not being set anywhere.

is there somewhere specific in a config file or elsewhere that i have to declare the app? in my application structure (outside of testing) i have an initalize.js that is require'd in index.html via require('initialize'), and i see that's where window.App = require('app')

i'm assuming this step needs to happen in the test running somewhere? but i just can't figure out where to do it.

i realize that this isn't the best place to ask for help, this isn't an actual bug, but i don't know where else i should ask.

thanks for the great tool gcollazo

Why including full Handlebars?

Hi,

As I understand it, templates are precompiled automatically using ember-handlebars-brunch. Therefore, is there a reason why the full Handlebars is included, while only the runtime could be included? Runtime is significantly smaller in size than the full Handlebars :).

Not finding views

What I did:

  • created a new project with brunch-with-ember-reloaded
  • scaffolt view Test
  • scaffold template Test
  • test.hbs is the following
<h1> Hello, World!</h1>
  • Changed the index.hbs to the following code
{{view App.TestView}}
  • added require 'views/TestView' and require 'templates/test.hbs to initialize.coffee

When I run the program, I get the error that it is "Unable to find view at path App.TestView"

What am I missing? This seems like it should be pretty straightforward. Your demo doesn't use any views.

Problem creating skeleton

I am trying to create a new brunch app based on this skeleton and I am seeing the following error:

C:\Documents and Settings\Kevin\My Documents\emberGadget>brunch new ember-reloaded-test --skeleton https://github.com/gcollazo/brunch-with-ember-reloaded
01 Apr 13:28:40 - log: Created skeleton directory layout
01 Apr 13:28:40 - error: { [Error: ENOTEMPTY, rmdir 'C:\Documents and Settings\Kevin\My Documents\emberGadget\ember-reloaded-test.git\objects\pack']
errno: 53,
code: 'ENOTEMPTY',
path: 'C:\Documents and Settings\Kevin\My Documents\emberGadget\ember-reloaded-test.git\objects\pack' }

The cleanest way to add Jade

Hi, thanks for the great project.

I'm new to this and wanted to add Jade so I installed "jade-handlebars-brunch". Its tests pass but it's not integrated into the compilation step. I could add the Jade compilation step by hand right before "content = compileHBS data.toString()" in index.coffee.

Is there a more graceful way to get Jade working?

Thanks,

  • Sanford

Installing NPM packages doesn't stop the previously running server

Steps to reproduce:

  1. Create a new directory with the brunch-with-ember-reloaded skeleton.
  2. Run brunch w -s.
  3. Open package.json in an editor.
  4. Overwrite it.
  5. Switch to the terminal you had brunch w -s running.

The server has stopped throwing a EADDRINUSE exception. It must be running along with the previous one. This doesn't happen in other skeletons, so I guess it has something to do with this one.

OS X 10.8.4, node 0.10.18, npm 1.3.8, brunch 1.7.4. Cheers!

Weird Template Error in ember. Ember-HandleBars-Brunch broken in 1.0.4?

Hi,

I'm just getting started with brunch and noticed that when I tried to download the package from brunch I get a ember error with the templates. I've noticed I can fix it by changing the version from ~1.0.0 to just 1.0.0 in package.json. I'm not sure if that is right. The ember.js starter app starts working though.

brunch new gh:gcollazo/brunch-with-ember-reloaded testembersite
cd testembersite
brunch watch -s

screen shot 2013-12-22 at 10 09 56 pm

The package.json dependencies are:

  "dependencies": {
    "javascript-brunch": "~1.7.0",
    "css-brunch": "~1.7.0",
    "stylus-brunch": "~1.7.0",
    "uglify-js-brunch": "~1.7.0",
    "clean-css-brunch": "~1.7.0",
    "auto-reload-brunch": "~1.7.0",
    "ember-handlebars-brunch": "~1.0.0"
  },

And npm list shows:

├─┬ [email protected]
│ └── [email protected]

first time pull, broken

brunch watch -s
16 Oct 23:01:19 - error: { [Error: Component must have "/Users/username/Code/testbrunch/bower_components/ember/bower.json"] code: 'NO_BOWER_JSON' }

didInsertElement causes brunch not to compile

Hi I'm trying to add a colorPicker plugin into my ember app, but everything I try to declare the didInsertElement method inside my view, it causes brunch to crash. Here's my code:

export default = App.NewView = Ember.View.extend({

  didInsertElement: function(){}
    this.$('color').simpleColor();
  }
});

Any suggestions would be appreciated. I really like using your project!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.