updated styleguide
This commit is contained in:
parent
b65d0e530b
commit
2d12173446
|
@ -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
|
||||
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
|
||||
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.
|
||||
|
||||
#### Example of a nested #docregion
|
||||
|
@ -116,12 +117,12 @@ include ../../../_includes/_util-fns
|
|||
.Component({
|
||||
selector: 'my-app'
|
||||
})
|
||||
// #enddocregion
|
||||
// #enddocregion component
|
||||
// #docregion view
|
||||
.View({
|
||||
template: '<h1 id="output">My First Angular 2 App</h1>'
|
||||
})
|
||||
// #enddocregion
|
||||
// #enddocregion view
|
||||
// #docregion class
|
||||
.Class({
|
||||
constructor: function () { }
|
||||
|
@ -129,6 +130,34 @@ include ../../../_includes/_util-fns
|
|||
// #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
|
||||
HTML files can also contain #docregion comments:
|
||||
|
||||
|
|
Loading…
Reference in New Issue