updated styleguide

This commit is contained in:
Jay Traband 2015-10-14 17:40:19 -07:00 committed by Naomi Black
parent b65d0e530b
commit 2d12173446
1 changed files with 32 additions and 3 deletions

View File

@ -102,7 +102,8 @@ include ../../../_includes/_util-fns
If a file only has a single `#docregion` then the entire file AFTER the `#docregion` comment is available for inclusion If a file only has a single `#docregion` then the entire file AFTER the `#docregion` comment is available for inclusion
via mixin. Portions of the file can be indicated by surrounding an area of the file with via mixin. Portions of the file can be indicated by surrounding an area of the file with
`#docregion` and an `#enddocregion` tags. These regions, each with its own name, may be nested to any level and any regions that are not 'ended' explicitly `#docregion` and an `#enddocregion` tags. These regions, each with its own name, may be nested to any level and any regions that are not 'ended' explicitly
are assumed to be ended automatically at the bottom of the file. Any individual region within the file is accessible are assumed to be ended automatically at the bottom of the file. Regions may either be ended/closed by name or if the name is left blank then the most recent
unclosed docregion defined earlier will be closed. Any individual region within the file is accessible
to the `makeExample` and `makeTabs` mixins. to the `makeExample` and `makeTabs` mixins.
#### Example of a nested #docregion #### Example of a nested #docregion
@ -116,12 +117,12 @@ include ../../../_includes/_util-fns
.Component({ .Component({
selector: 'my-app' selector: 'my-app'
}) })
// #enddocregion // #enddocregion component
// #docregion view // #docregion view
.View({ .View({
template: '<h1 id="output">My First Angular 2 App</h1>' template: '<h1 id="output">My First Angular 2 App</h1>'
}) })
// #enddocregion // #enddocregion view
// #docregion class // #docregion class
.Class({ .Class({
constructor: function () { } constructor: function () { }
@ -129,6 +130,34 @@ include ../../../_includes/_util-fns
// #enddocregion // #enddocregion
// #enddocregion // #enddocregion
:markdown
Multiple `#docregion` tags may be defined on a single line as shown below. In addition, anytime a file contains multiple
`#docregion` tags with the same name they will automatically be combined. Each of the individually tagged sections of the combined document
will be separated from one another by a comment consisting or '. . .'. This default separator, known
as 'plaster' can be overriden anywhere within the affected file via a `#docplaster` comment as shown below. This example creates
a separator that consists of `/* more code here */` in the output file.
code-example(format="linenums" language="js" escape="html").
// #docplaster more code here
// #docregion import,twoparts
import {Component, View, bootstrap} from 'angular2/angular2';
// #enddocregion twoparts, import
@Component({
selector: 'my-app'
})
@View({
template: '<h1 id="output">My first Angular 2 App</h1>'
})
class AppComponent {
}
// #docregion bootstrap, twoparts
bootstrap(AppComponent);
// #enddocregion twoparts
doSomethingInteresting();
// #enddocregion
:markdown :markdown
HTML files can also contain #docregion comments: HTML files can also contain #docregion comments: