Skip to content

Commit

Permalink
Fixes #291 - adds docs for new server profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
addyosmani committed Sep 4, 2012
1 parent 96d8744 commit 5b35606
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
13 changes: 13 additions & 0 deletions docs/cli/commands/server.md
Expand Up @@ -21,3 +21,16 @@ A complete build can be generated using `yeoman build`.

To quit the server, simply run `yeoman quit server` and this will kill the Python server
process.

### profiles

The built-in server also supports serving different profiles of your application, such as: `app`, `dist`, `test` and `reload`.

* `yeoman server` and `server:app` compile to and serve `/temp`, an intermediate build of your application.
* `yeoman server:dist` serves up the optimized final version of your application. This will just serve up the `/dist` directory if it exists and you will need to run `yeoman build` in order to generate the production build of your app.
* `yeoman server:test` serves up the test suite
* `yeoman server:reload` forces the port to be LiveReload standard port: 35729 and prevents the automatic default browser opening. Handy for those wishing to use livereload extensions with other systems / HTTP servers than the one provided by Yeoman out of the box.

### further notes

At present, when initially running `yeoman server` or `yeoman server:app`, some users may find that their browser is opened before intermediate files such as Compass and CoffeeScript have completed compiling. Whilst we intend on fixing this issue very soon, in the mean time we recommend refreshing the browser shortly after you first fire up the server (e.g 10 seconds after). You can then easily make any changes you wish to your application and the browser will be automatically reloaded via LiveReload.
17 changes: 11 additions & 6 deletions readme.md
Expand Up @@ -48,10 +48,12 @@ yeoman lookup # Look up info on a particular package
A common initial workflow with Yeoman might be:

```shell
yeoman init # Invoke the most basic application scaffold (Bootstrap, Boilerplate etc.)
yeoman build # Build your project, creating an optimized version in a new `dist` directory
yeoman server # Fire off a file watch/server process which also places an
# intermediate build of your project in `temp`
yeoman init # Invoke the most basic application scaffold (Bootstrap, Boilerplate etc.)
yeoman server # Fire off a file watch/server process which also places an
# intermediate build of your project in `temp`
yeoman build # Build your project, creating an optimized version in a new `dist` directory
yeoman server:dist # Serve up the production-ready version of your application

```

Some more examples of how to use our commands include:
Expand All @@ -63,14 +65,17 @@ yeoman init bbb # Backbone Boilerplate generator scaffo
yeoman init ember # Ember-Rails generator scaffold
yeoman init ember-starter # Create a "Hello World" Yeoman project with the Ember Starter Kit
yeoman init backbone # Backbone-Rails generator scaffold

# Coming soon
yeoman init angular # Invoke the AngularJS generator scaffold
yeoman init angular:controller # Invoke the AngularJS Controller sub-generator

# Generator for Chrome Apps
yeoman init chromeapps

# Additional server profiles
yeoman server:app # Serves up an intermediate build of your application
yeoman server:dist # Serves up a production build, if you've built before
yeoman server:test # Serves your test suite

# Package management
yeoman search jquery # Lookup jQuery in the Bower registry
yeoman install jquery underscore [depName] # Install a dependency or dependencies
Expand Down

0 comments on commit 5b35606

Please sign in to comment.