Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up EmberJS project directory structure?

Tags:

ember.js

I have been working with EmberJS online guides, and it has been somewhat of a hit or miss process. With Sproutcore2 I could generate the project directory structure via commandline command and be done with it. Well with Ember, it is rather manual. I would like to be able to set up a project's director structure where I am able to separate the model(s),view(s), and control(s) into their own folders. I have been trying to do so but require statements aren't importing correctly from MVC folders. I have downloaded the "todos" app, but it is no help, because the directory structure is not demonstrated as I had expected.

I would like to start with a simple "HelloWorld" application where "app" will be my facade, and I can then import my models,views, and controls from their folders which will be placed under mvc folder within the "HelloWorldApp" folder. Appreciate all your help.

HelloWorldApp (project directory)
   ->js (directory)
   ->lib (directory)
            ->ember-0.9.5
            ->ember-0.9.5.min
            ->jquery-1.6.1.min

  ->template (directory)
          ->main-view-template

  ->mvc (directory)
      ->model (directory)
      ->view (directory)
      ->control (directory)

  ->css (directory)

app (app.js)
index.htm

like image 581
Combustion007 Avatar asked Mar 15 '12 19:03

Combustion007


1 Answers

Take a look at the early alpha of the Ember build tools' template structure (based on Ember-Skeleton): https://github.com/emberjs/ember-gem/tree/master/lib/ember/templates/app. I'd imagine that something very close to this structure will be the default moving forward.

like image 137
Roy Daniels Avatar answered Nov 17 '22 19:11

Roy Daniels