Permalink
Browse files

Convert docs to use fenced code blocks again

  • Loading branch information...
1 parent f5fd21b commit 32b634057f7250a6cd0c55986b72f59146b202ba @sindresorhus sindresorhus committed Jan 4, 2013
View
@@ -1,5 +1,3 @@
-
-
## <a href="#build" name="build">build</a>
Usage: `yeoman build`, `yeoman build:<target>`
@@ -63,24 +61,21 @@ setup each time.
The following is the relevant block to edit within your Gruntfile:
-{% highlight javascript %}
- // rjs configuration. You don't necessarily need to specify the typical
- // `path` configuration, the rjs task will parse these values from your
- // main module, using http://requirejs.org/docs/optimization.html#mainConfigFile
- //
- // name / out / mainConfig file should be used. You can let it blank if
- // you're using usemin-handler to parse rjs config from markup (default
- // setup)
- rjs: {
- // no minification, is done by the min task
- optimize: 'none',
- baseUrl: './scripts',
- wrap: true
- }
-{% endhighlight %}
+```js
+// rjs configuration. You don't necessarily need to specify the typical
+// `path` configuration, the rjs task will parse these values from your
+// main module, using http://requirejs.org/docs/optimization.html#mainConfigFile
+//
+// name / out / mainConfig file should be used. You can let it blank if
+// you're using usemin-handler to parse rjs config from markup (default
+// setup)
+rjs: {
+ // no minification, is done by the min task
+ optimize: 'none',
+ baseUrl: './scripts',
+ wrap: true
+}
+```
See the official project [repo](https://github.com/jrburke/r.js) for more information on the
options supported by r.js.
-
-
-
@@ -1,11 +1,10 @@
-
## <a href="#help" name="help">help</a>
* `yeoman --help` or `yeoman help`
Lists out the commands and tasks supported by yeoman and should print out the following to the console:
-{% highlight sh %}
+```sh
yeoman init # Initialize and scaffold a new project using generator templates
yeoman build # Build an optimized version of your app, ready to deploy
yeoman server # Launch a preview server which will begin watching for changes
@@ -17,6 +16,6 @@ yeoman update # Update a package to the latest version
yeoman list # List the packages currently installed
yeoman search # Query the registry for matching package names
yeoman lookup # Look up info on a particular package
-{% endhighlight %}
+```
Note that commands may also support additional flags and so we recommend consulting the documentation for specific commands for the complete details.
View
@@ -16,8 +16,7 @@ By default we support Compass and CoffeeScript, so if your project includes any
If everything has been installed successfully, running `yeoman init` will present you with a welcome screen to kick off your project that looks a little like this:
-{% highlight sh %}
-
+```sh
_ .--------------------------.
_|o|_ | Welcome to Yeoman, |
|_| | ladies and gentlemen! |
@@ -32,71 +31,60 @@ Out of the box I include HTML5 Boilerplate, jQuery and Modernizr.
Please answer the following:
[?] Would you like to include Twitter Bootstrap for Compass? (Y/n)
-{% endhighlight %}
+```
### custom generators
Some of our supported custom generators include:
-{% highlight sh %}
-yeoman init bbb #backbone boilerplate
-yeoman init angular #angularjs seed
-yeoman init ember #ember app based on ember-rails
-{% endhighlight %}
+```sh
+yeoman init bbb # backbone boilerplate
+yeoman init angular # angularjs seed
+yeoman init ember # ember app based on ember-rails
+```
Yeoman comes with a powerful system of Generators for scaffolding out applications using any number of boilerplates, frameworks and dependencies. Generators can be called in a project which has already been initialized with a basic Yeoman application structure OR may contain all of the files needed for the application structure themselves. By default, one can call a generator as follows:
-{% highlight sh %}
-yeoman init generatorName #e.g yeoman init angular
-{% endhighlight %}
+```sh
+yeoman init generatorName # e.g yeoman init angular
+```
In the case of a Generator named "angular", a grouping sub-generator called `all` may exist for scaffolding out all of the files needed for a new AngularJS application. One would use this as follows:
-{% highlight sh %}
-yeoman init angular:all
-{% endhighlight %}
+ yeoman init angular:all
The idea here is that the Generator would pull in AngularJS, its common dependencies and write out the boilerplate needed for a basic Controller and any other components the framework may require.
As we understand that it's unlikely a user will wish to manually type out the ":all" part of each generator, we support a catch-"all". If a generator has a sub-generator (grouper) called "all" we will attempt to call "all" when you try running the top-level generator. This allows a user to simply call:
-{% highlight sh %}
-yeoman init angular
-{% endhighlight %}
+ yeoman init angular
+
and has it defer to `angular:all` automatically.
If one then wishes to create further AngularJS controllers, one can simply call the 'controller' sub-generator as follows:
-{% highlight sh %}
-yeoman init angular:controller controllerName
-{% endhighlight %}
+ yeoman init angular:controller controllerName
where `controllerName` is the name of the Controller you wish to create.
Similarly, a Backbone.js Generator may be used as follows:
-{% highlight sh %}
-yeoman init backbone
-{% endhighlight %}
+ yeoman init backbone
where the above would result in boilerplate for models, views, collections and a router being written to the current application directory, as well as Backbone.js and its dependencies being pulled in. One could then call the different sub-generators for the Generator as follows:
-{% highlight sh %}
-yeoman init backbone:model modelName
-yeoman init backbone:collection collectionName
-yeoman init backbone:view viewName
-yeoman init backbone:router routerName
-{% endhighlight %}
+ yeoman init backbone:model modelName
+ yeoman init backbone:collection collectionName
+ yeoman init backbone:view viewName
+ yeoman init backbone:router routerName
To list out all of the generators currently available locally, you can use the `--help` flag as follows:
-{% highlight sh %}
-yeoman init --help
-{% endhighlight %}
+ yeoman init --help
This will print out a list of existing generators, including some of the below:
-{% highlight sh %}
+```sh
Please choose a generator below.
Yeoman:
@@ -115,4 +103,4 @@ Backbone:
backbone:router
backbone:view
backbone:collection
-{% endhighlight %}
+```
@@ -8,47 +8,41 @@ By default, running `yeoman install packageName` will install the dependency in
Example:
-{% highlight sh %}
+```sh
yeoman install backbone
# or if you wish to install multiple packages at once..
yeoman install jquery spine
-{% endhighlight %}
+```
As mentioned, the files for these dependencies will be added to `app/components`. If you wish to use any of them you will need to manually include a script/file reference to the relevant source files.
Example:
-{% highlight html %}
+```html
<script src="components/spine/lib/spine.js"></script>
-{% endhighlight %}
+```
If installing a dependency which has its own dependencies described, these dependencies will also be pulled in.
Example:
-{% highlight sh %}
-yeoman install backbone
-{% endhighlight %}
+ yeoman install backbone
will actually also install Underscore.js and jQuery.js as these are required for Backbone to function correctly.
`yeoman install` also supports installing packages using more than just the package name. Namely:
-{% highlight sh %}
-yeoman install jquery
-yeoman install git://github.com/components/jquery.git
-yeoman install components/jquery (same as above)
-yeoman install http://foo.com/jquery.awesome-plugin.js
-yeoman install ./repos/jquery
-{% endhighlight %}
+ yeoman install jquery
+ yeoman install git://github.com/components/jquery.git
+ yeoman install components/jquery (same as above)
+ yeoman install http://foo.com/jquery.awesome-plugin.js
+ yeoman install ./repos/jquery
As you can see, packages can be installed by name, Git endpoint, GitHub shorthand, URL or local path. If you install and URL that is a zip or tar file, yeoman will automatically extract the contents of it. When tags are available in the endpoint, you can specify a semver tag to fetch concrete versions:
-{% highlight sh %}
-yeoman install jquery#1.8.1
-yeoman install git://github.com/components/jquery.git#~1.8.1
-yeoman install components/jquery#1.8.x
-{% endhighlight %}
+ yeoman install jquery#1.8.1
+ yeoman install git://github.com/components/jquery.git#~1.8.1
+ yeoman install components/jquery#1.8.x
More in the [Bower docs](https://github.com/twitter/bower/blob/master/README.md#usage)
@@ -1,5 +1,3 @@
-
-
## <a href="#list" name="list">list</a>
Usage: `yeoman list`
@@ -8,7 +6,7 @@ Lists all of the packages that have been installed using `yeoman install` (Bower
Example:
-{% highlight sh %}
+```sh
# If you have previously called
yeoman install backbone
@@ -23,6 +21,6 @@ yeoman list
│ └── underscore#1.3.3
├── jquery#1.7.2
└── underscore#1.3.3
-{% endhighlight %}
+```
As you can see, this also includes the version information for each package and its dependencies.
@@ -1,5 +1,3 @@
-
-
## <a href="#lookup" name="lookup">lookup</a>
Usage: `yeoman lookup <packageName>`
@@ -8,10 +6,10 @@ Performs a lookup in the Bower registry for a package of a specific name. One wo
Example:
-{% highlight sh %}
+```sh
yeoman lookup jquery
# outputs
jquery git://github.com/maccman/package-jquery.git
-{% endhighlight %}
+```
@@ -1,5 +1,3 @@
-
-
## <a href="#search" name="search">search</a>
Usage: `yeoman search <keyword>`
@@ -8,7 +6,7 @@ Searches the Bower registry for packages which include a specific keyword in the
Example:
-{% highlight sh %}
+```sh
yeoman search jquery
# outputs
@@ -18,5 +16,4 @@ Search results:
- jquery git://github.com/maccman/package-jquery.git
- jquery-ui git://github.com/maccman/package-jquery-ui.git
- jquery-infinite-scroll git://github.com/paulirish/infinite-scroll.git
-
-{% endhighlight %}
+```
@@ -1,5 +1,3 @@
-
-
## <a href="#server" name="server">server</a>
Usage: `yeoman server`
@@ -1,5 +1,3 @@
-
-
## <a href="#test" name="test">test</a>
Usage: `yeoman test`
@@ -18,7 +16,7 @@ launched to serve file for PhantomJS.
Example:
-{% highlight sh %}
+```sh
yeoman test
# outputs:
@@ -29,4 +27,4 @@ Running specs for index.html
>> 82 assertions passed in 53 specs (562ms)
Done, without errors.
-{% endhighlight %}
+```
@@ -1,4 +1,3 @@
-
## <a href="#uninstall" name="uninstall">uninstall</a>
Usage: yeoman uninstall packageName
@@ -7,24 +6,23 @@ Removes the package `packageName` from the current project.
Example:
-{% highlight sh %}
+```sh
yeoman uninstall backbone
# outputs:
bower uninstalling /project/components/backbone
-{% endhighlight %}
+```
-Note: If you attempt to uninstall a package that is a dependency of other packages, yeoman (via Bower)
-will throw an error.
+Note: If you attempt to uninstall a package that is a dependency of other packages, yeoman (via Bower) will throw an error.
Example:
-{% highlight sh %}
+```sh
yeoman uninstall jquery
# outputs:
warning backbone depends on jquery
-{% endhighlight %}
+```
This simply means that you should uninstall backbone (the top-level package with the dependency) if you wish to remove all traces of the jquery package.
@@ -1,5 +1,3 @@
-
-
## <a href="#update" name="update">update</a>
Usage: `yeoman update <packageName>`
@@ -8,11 +6,11 @@ Updates an already installed package `packageName` to the latest version availab
Example:
-{% highlight sh %}
+```sh
yeoman update jquery
# outputs
bower checking out jquery#v1.7.2
-{% endhighlight %}
+```
The `update` command will also update any other packages in your project relying on this dependency to use this most recent version if any update is applied.
Oops, something went wrong.

0 comments on commit 32b6340

Please sign in to comment.