eclifford / generator-testudo

Testudo is a Grunt based boilerplate for the building of modern, modular, testable web applications.
7 stars 1 forks source link

Proposed file structure changes #19

Open hershmire opened 10 years ago

hershmire commented 10 years ago

What are your thoughts on the following:

So this for the structure:

testudo/
  |- .tmp/                    // staging directory for compiled artifacts
  |- dist/                    // production directory for prod quality artifacts
  |- app/
  |  |- assets/               // static assets such as images and fonts
  |  |- common/               // third party or internal libraries (not managed by bower)
  |  |- modules/              // location of all module widgets in your application
  |  |  |- EXAMPLE_MODULE/    // example widget
  |  |  |  |- collections/
  |  |  |  |- models/
  |  |  |  |- templates/
  |  |  |  |- test/
  |  |  |  |- views/
  |  |  |- main.sass          // widget entry point (bootstrapper)
  |  |  |- main.coffee        // widget stylesheet
  |  |- views/                // application pages
  |  |  |- partials/          // Jade partial templates for runtime import
  |  |  |  |- header.html
  |  |  |- layouts/           // Jade layout templates
  |  |  |  |- layout.html     // main layout for Jade (Grunt ignores compiling any layouts)
  |  |  |- index.html
  |  |  |- page2.html
  |  |  |- page2/
  |  |  |  |- index.html      // or you can have a page with .html extension
  |  |- vendor                // 3rd party libraries managed by bower
  |  |  |- bower_components/
  |  |- .htaccess
  |  |- common.coffee         // RequireJS configuration
  |  |- index.html            // Application start page
  |  |- main.coffee           // Application global script bootstrap
  |  |- main.sass             // Application global stylesheet
  |- tasks/                   // Grunt configuration files
  |- .bowerrc
  |- bower.json
  |- Gruntfile.coffee
  |- package.json
eclifford commented 10 years ago

Good feedback.

hershmire commented 10 years ago

views seems to make more sense to me over pages as we'll be storing partials, layouts, (helpers?), and page views in there. This of course is separate from JS views which are stored in their specific module folder location.

My assets comment would follow the same pattern for dist as well. I wasn't referring to change it only while in development mode. My only argument is for a simplified path for the end user. I know Rails handles their asset pipeline similarly but not sure what their main reasoning to do that is. So no big case against this one yet. Just wanted your opinion on it.

Thoughts on my comment about removing the common folder?

eclifford commented 10 years ago

I'm cool with switching from pages to views. I'll included that in my next pull request.

I'm also good on removing the common folder.

The assets thing I think I'd like to talk to you a bit more about.

hershmire commented 10 years ago

Sounds good. Let me know what you're planning to work on and I'll work on another feature or issue once it's logged in Github issues.

eclifford commented 10 years ago

I'm currently working on a few things

1) Scaffold the project in Coffeescript or JavaScript including using the appropriate linter and auto configuring the watchers/compilers with grunt 2) Scaffold the project using either SASS or Stylus including setting up the proper module glob patterns 3) Finish the Module sub scaffolder so you can do something like yo testudo:module Foo and it will create a stub module in either JS/CS and Stylus/SASS 4) I want to break out all the sub generators into their own folders so everything is clean and separate. 5) I want to add a CLI for testudo so you can do things like testudo module Foo and testudo server... basically wrapping Grunt, Yo, and Bower in one interface.

eclifford commented 10 years ago

so basically I'm hoping to finish these soon

8

20

12