strongloop/generator-loopback — pull request #8 by bajtos (2014-07-07 15:37:39+00:00)
Title: Example generator

This pull requests implements `yo loopback:example` generator that produces a LoopBack 2.0 equivalent of [sls-sample-app](https://github.com/strongloop/sls-sample-app).

The generators is implemented as a series of calls to `yo loopback` generators and loopback-workspace. See SLA-840:

> However, the fully scaffolded sample should be built through an automated
script, perhaps one that simply greps the yeoman commands from the docs, and
runs them, perhaps one that literally calls all the sub-generators in correct
order with correct args.

> The purpose of the fully generated sample app is so that someone can choose to
just read the sample app or its docs, or to follow along with the docs and learn
as they go. They can also choose to skip both the docs and the detailed
commands, and move onto working with our debuggers, seeing how easy/hard it is
to deploy, etc, and go back later to learning how to build applications like the
sample.

> The test-data from sls-sample-app should be preserved in the scaffolded app.

This pull request implements most of the functionality. A detailed list of commands can be obtained by running `yo loopback:example -l`.

Things on implemented yet - I'll probably make them in a new pull request:
- A check that the current directory is not containing an existing LB project
- rest connector for Geo lookup (see TODO in the code)
- sample data
- tests in the scaffolded app
- the file `rest/datasources.json` contains extra `configFile` key
- print custom URL when running in Cloud9

/to @ritch please review
/to @sam-github is this implementation providing what you were asking for in SLA-840?