Home

Awesome

generator-hottowel

NPM version Build Status

Create an Angular application using the HotTowel style (via a Yeoman generator)

Opinionated Angular style guide for teams by @john_papa

More details about the styles and patterns used in this app can be found in my Angular Style Guide and my Angular Patterns: Clean Code course at Pluralsight and working in teams.

Prerequisites

  1. Install Node.js

  2. Install these npm packages globally

    npm install -g yo bower gulp nodemon
    

    Refer to these instructions on how to not require sudo

QuickStart

  1. Install generator-hottowel

    npm install -g generator-hottowel
    
  2. Create a new folder and change directory to it

    mkdir myapp
    cd myapp
    
  3. Run the generator

    yo hottowel helloWorld
    

HotTowel Options

Application Name

Running HotTowel

Linting

Tests

Running in dev mode

Building the project

Running the optimized code

Exploring HotTowel

HotTowel Angular starter project

Structure

The structure also contains a gulpfile.js and a server folder. The server is there just so we can serve the app using node. Feel free to use any server you wish.

/src
  /client
    /app
    /content

Installing Packages

When you generate the project it should run these commands, but if you notice missing packages, run these again:

The Modules

The app has 4 feature modules and depends on a series of external modules and custom but cross-app modules

app --> [
        app.admin --> [
            app.core,
            app.widgets
        ],
        app.dashboard --> [
            app.core,
            app.widgets
        ],
        app.layout --> [
            app.core
        ],
        app.widgets,
		app.core --> [
			ngAnimate,
			ngSanitize,
			ui.router,
			blocks.exception,
			blocks.logger,
			blocks.router
		]
    ]

core Module

Core modules are ones that are shared throughout the entire application and may be customized for the specific application. Example might be common data services.

This is an aggregator of modules that the application will need. The core module takes the blocks, common, and Angular sub-modules as dependencies.

blocks Modules

Block modules are reusable blocks of code that can be used across projects simply by including them as dependencies.

blocks.logger Module

The blocks.logger module handles logging across the Angular app.

blocks.exception Module

The blocks.exception module handles exceptions across the Angular app.

It depends on the blocks.logger module, because the implementation logs the exceptions.

blocks.router Module

The blocks.router module contains a routing helper module that assists in adding routes to the $routeProvider.

Gulp Tasks

Task Listing

Code Analysis

Testing

Cleaning Up

Fonts and Images

Styles

Bower Files

Angular HTML Templates

Serving Development Code

Building Production Code

Serving Production Code

Bumping Versions

License

MIT