Skip to content

Commit b7e1227

Browse files
committed
Update docs for /site/default
1 parent afbc7d8 commit b7e1227

21 files changed

+169
-57
lines changed

site/default/default.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@parent bit-docs-generate-html
2-
@page bit-docs-generate-html/about About
2+
@page bit-docs-generate-html/about-defaults About the defaults
33

44
@description Templates and styles come with the default theme.
55

@@ -17,15 +17,16 @@ The default templates do not make any assumptions about the type of website
1717
you are trying to generate. If you are generating documentation, you will
1818
probably want to add things like function signatures to the output of the
1919
generated website. That can be done by adding the `signature.mustache` to
20-
[bit-docs-generate-html/theme/templates/content].
20+
[bit-docs-generate-html/site/default/templates/content.mustache].
2121

2222
Other documentation that you might want to expose will come from the various
23-
[docObjects] in the [docMap], and you will need to create your own mustache
24-
templates as well as helpers to support that.
23+
[bit-docs/types/docObject]s in the [bit-docs/types/docMap], and you will need
24+
to create your own mustache templates as well as helpers to support that.
2525

2626
Most users will be happy using the default output for documentation, and will
2727
primarily be editing the templates to add HTML markup for styling and
28-
structure purposes, in tandem with [bit-docs-generate-html/theme/styles].
28+
structure purposes, in tandem with
29+
[bit-docs-generate-html/site/default/static/styles/styles.less].
2930

3031
For any template files not copied over, the default template will be used.
3132

@@ -37,10 +38,11 @@ By default, `bit-docs` provides a very basic theme that consists of styles
3738
that are meant to be copied over to your project and/or a custom theme,
3839
and modified there as needed to suit your specific design needs.
3940

40-
Any of these files can be copied over and modified as needed. For any LESS
41-
files not copied over, the default LESS file will be used.
41+
Any of these files can be copied over and modified as needed. For any less
42+
files not copied over, the default less file will be used.
4243

43-
Certain plugins provide their own LESS files for defining variables that
44+
Certain plugins provide their own less files for defining variables that
4445
are to be used in styling whatever they add, and will include your
45-
[variables.less] after their own so that you may override any LESS variables
46-
that you might wish to. A good example of this is [bit-docs-prettify].
46+
[bit-docs-generate-html/site/default/static/styles/variables.less] after
47+
their own so that you may override any less variables that you might wish to.
48+
A good example of this is [bit-docs-prettify].

site/default/static/build.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
<body>
33
<script src="./node_modules/steal/steal.js"></script>
44
</body>
5-
65
</html>

site/default/static/build.html.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@parent bit-docs-generate-html/site/default/static
2+
@module {function} bit-docs-generate-html/site/default/static/build.html
3+
4+
@description An HTML file that includes steal.
5+
6+
@body
7+
8+
Gets copied to
9+
[bit-docs-generate-html/site/static/build/buildHash/build.html].

site/default/static/build.js

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1+
var stealTools = require("steal-tools");
2+
var fsx = require('../../../../fs_extras');
3+
var Q = require('q');
4+
var path = require("path");
15

2-
var stealTools = require("steal-tools"),
3-
fsx = require('../../../../fs_extras'),
4-
Q = require('q'),
5-
path = require("path");
6-
7-
6+
/**
7+
* @parent bit-docs-generate-html/site/default/static
8+
* @module {function} bit-docs-generate-html/site/default/static/build.js
9+
*
10+
* The `bit-docs-site` script for building static assets.
11+
*
12+
* @signature `build(options, folders)`
13+
*
14+
* Copies everything and `steal.js`.
15+
*
16+
* @body
17+
*
18+
* Gets copied to
19+
* [bit-docs-generate-html/site/static/build/buildHash/build.js].
20+
*/
821
module.exports = function(options, folders){
9-
1022
var copyDir = function(name){
1123
return fsx.mkdirs( path.join(folders.dist,name) ).then(function(){
1224
return fsx.exists(path.join(folders.build,name)).then(function(exists){
@@ -55,7 +67,4 @@ module.exports = function(options, folders){
5567

5668
});
5769
}
58-
59-
60-
6170
};

site/default/static/package.json.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@parent bit-docs-generate-html/site/default/static
2+
@module bit-docs-generate-html/site/default/static/package.json
3+
4+
@description The `bit-docs-site` dummy `package.json`.
5+
6+
@body
7+
8+
Contains the basics of a website package with a dependency on
9+
[steal](https://stealjs.com/):
10+
11+
```js
12+
{
13+
"name": "bit-docs-site",
14+
"version": "0.0.1",
15+
"description": "A site to be built",
16+
"main": "static.js",
17+
"scripts": {
18+
"test": "echo \"Error: no test specified\" && exit 1"
19+
},
20+
"steal": {
21+
"plugins": [
22+
"steal-less"
23+
]
24+
},
25+
"author": "Bitovi",
26+
"license": "MIT",
27+
"dependencies": {
28+
"steal": "1.X",
29+
"steal-less": "1.X"
30+
}
31+
}
32+
```
33+
34+
Gets copied to [bit-docs-generate-html/site/static/build/buildHash/package.json].

site/default/static/packages.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @parent bit-docs-generate-html/site/default/static
3+
* @module bit-docs-generate-html/site/default/static/packages.js
4+
*
5+
* @description An empty `bit-docs-site` placeholder for calling front end
6+
* plugins.
7+
*
8+
* @body
9+
*
10+
* Gets updated and copied to
11+
* [bit-docs-generate-html/site/static/build/buildHash/packages.js]
12+
*/

site/default/static/static.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
/**
2-
* @parent bit-docs-generate-html/site
3-
* @page bit-docs-generate-html/site/default/static/static.js default/static/static.js
2+
* @parent bit-docs-generate-html/site/default/static
3+
* @module bit-docs-generate-html/site/default/static/static.js
4+
*
5+
* @description The `bit-docs-site` script for including static assets.
6+
*
7+
* @body
48
*
5-
* @description Contains all the static assets like LESS and images.
9+
* Gets copied to
10+
* [bit-docs-generate-html/site/static/build/buildHash/static.js].
611
*/
712
var packages = require("./packages");
813
require("./styles/styles.less!");

site/default/static/static.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@parent bit-docs-generate-html/static
2+
@module bit-docs-generate-html/site/default/static
3+
4+
@description Directory that contains the default static assets and a build
5+
script.
6+
7+
@body
8+
9+
- [bit-docs-generate-html/site/default/static/build.html]
10+
- [bit-docs-generate-html/site/default/static/build.js]
11+
- [bit-docs-generate-html/site/default/static/package.json]
12+
- [bit-docs-generate-html/site/default/static/packages.js]
13+
- [bit-docs-generate-html/site/default/static/static.js]
14+
- [bit-docs-generate-html/site/default/static/styles/mixins.less]
15+
- [bit-docs-generate-html/site/default/static/styles/styles.less]
16+
- [bit-docs-generate-html/site/default/static/styles/variables.less]
17+
18+
These defaults get built into a
19+
[bit-docs-generate-html/site/static/build/buildHash] directory with a simple
20+
[`package.json`](bit-docs-generate-html/site/static/build/buildHash/package.json)
21+
whose `name` is set to `bit-docs-site` so that [steal](https://stealjs.com/)
22+
can be used to compile less and load dependencies on the front end of the
23+
generated website.

site/default/static/styles/mixins.less

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
/**
2-
* @parent bit-docs-generate-html/static
3-
* @module bit-docs-generate-html/site/default/styles/mixins.less mixins.less
2+
* @parent bit-docs-generate-html/site/default/static
3+
* @module bit-docs-generate-html/site/default/static/styles/mixins.less
44
*
55
* @description Mixins for site-wide visual layout.
66
*
77
* @body
88
*
9-
* Mixins are useful as reusable rules that can be added into any declaration.
10-
*
11-
* Read more about mixins [here](http://lesscss.org/features/#mixins-feature).
9+
* Mixins are useful as reusable rules that can be added into any declaration:
10+
* - [bit-docs-generate-html/site/default/static/styles/mixins.less.display-flex]
11+
* - [bit-docs-generate-html/site/default/static/styles/mixins.less.flex-auto]
12+
* - [bit-docs-generate-html/site/default/static/styles/mixins.less.flex-column]
13+
* - [bit-docs-generate-html/site/default/static/styles/mixins.less.flex-initial]
14+
* - [bit-docs-generate-html/site/default/static/styles/mixins.less.flex-none]
15+
* - [bit-docs-generate-html/site/default/static/styles/mixins.less.flex-row]
16+
* - [bit-docs-generate-html/site/default/static/styles/mixins.less.helper-flex]
17+
* - [bit-docs-generate-html/site/default/static/styles/mixins.less.helper-padding]
18+
*
19+
* Read more about mixins at
20+
* [lesscss.org](http://lesscss.org/features/#mixins-feature).
1221
*/
1322

1423
#helper {

site/default/static/styles/styles.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* @parent bit-docs-generate-html/static
3-
* @module bit-docs-generate-html/site/default/static/styles/styles.less styles.less
2+
* @parent bit-docs-generate-html/site/default/static
3+
* @module bit-docs-generate-html/site/default/static/styles/styles.less
44
*
55
* @description The primary styles for the default theme.
66
*

0 commit comments

Comments
 (0)