diff --git a/docs/cli/commands/server.md b/docs/cli/commands/server.md index bd1e875b..4c60a7db 100644 --- a/docs/cli/commands/server.md +++ b/docs/cli/commands/server.md @@ -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. \ No newline at end of file diff --git a/readme.md b/readme.md index dcebc157..d93f803a 100644 --- a/readme.md +++ b/readme.md @@ -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: @@ -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