mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 21:28:12 +00:00
[Documentation] Add text to main page #228
This commit is contained in:
@ -106,7 +106,7 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert from Github-flavored Markdown to HTML
|
// Convert from Github-flavored Markdown to HTML
|
||||||
function gfmifier() {
|
function gfmifier(renderTOC) {
|
||||||
var transform = new stream.Transform({ objectMode: true }),
|
var transform = new stream.Transform({ objectMode: true }),
|
||||||
markdown = "";
|
markdown = "";
|
||||||
transform._transform = function (chunk, encoding, done) {
|
transform._transform = function (chunk, encoding, done) {
|
||||||
@ -114,9 +114,11 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
|||||||
done();
|
done();
|
||||||
};
|
};
|
||||||
transform._flush = function (done) {
|
transform._flush = function (done) {
|
||||||
// Prepend table of contents
|
if (renderTOC){
|
||||||
markdown =
|
// Prepend table of contents
|
||||||
[ TOC_HEAD, toc(markdown).content, "", markdown ].join("\n");
|
markdown =
|
||||||
|
[ TOC_HEAD, toc(markdown).content, "", markdown ].join("\n");
|
||||||
|
}
|
||||||
this.push(header);
|
this.push(header);
|
||||||
this.push(marked(markdown));
|
this.push(marked(markdown));
|
||||||
this.push(footer);
|
this.push(footer);
|
||||||
@ -146,6 +148,10 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
|||||||
return customRenderer;
|
return customRenderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function matchesPattern(pattern, candidate){
|
||||||
|
return candidate.match(pattern);
|
||||||
|
}
|
||||||
|
|
||||||
options['in'] = options['in'] || options.i;
|
options['in'] = options['in'] || options.i;
|
||||||
options.out = options.out || options.o;
|
options.out = options.out || options.o;
|
||||||
|
|
||||||
@ -168,13 +174,14 @@ GLOBAL.window = GLOBAL.window || GLOBAL; // nomnoml expects window to be define
|
|||||||
var destination = file.replace(options['in'], options.out)
|
var destination = file.replace(options['in'], options.out)
|
||||||
.replace(/md$/, "html"),
|
.replace(/md$/, "html"),
|
||||||
destPath = path.dirname(destination),
|
destPath = path.dirname(destination),
|
||||||
prefix = path.basename(destination).replace(/\.html$/, "");
|
prefix = path.basename(destination).replace(/\.html$/, ""),
|
||||||
|
renderTOC = file.match(options['suppress-toc'] || "") === null;
|
||||||
|
|
||||||
mkdirp(destPath, function (err) {
|
mkdirp(destPath, function (err) {
|
||||||
fs.createReadStream(file, { encoding: 'utf8' })
|
fs.createReadStream(file, { encoding: 'utf8' })
|
||||||
.pipe(split())
|
.pipe(split())
|
||||||
.pipe(nomnomlifier(destPath, prefix))
|
.pipe(nomnomlifier(destPath, prefix))
|
||||||
.pipe(gfmifier())
|
.pipe(gfmifier(renderTOC))
|
||||||
.pipe(fs.createWriteStream(destination, {
|
.pipe(fs.createWriteStream(destination, {
|
||||||
encoding: 'utf8'
|
encoding: 'utf8'
|
||||||
}));
|
}));
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
<!--
|
|
||||||
Open MCT Web, Copyright (c) 2014-2015, United States Government
|
|
||||||
as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
Administration. All rights reserved.
|
|
||||||
|
|
||||||
Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
|
||||||
"License"); you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
License for the specific language governing permissions and limitations
|
|
||||||
under the License.
|
|
||||||
|
|
||||||
Open MCT Web includes source code licensed under additional open source
|
|
||||||
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
this source code distribution or the Licensing information page available
|
|
||||||
at runtime from the About dialog for additional information.
|
|
||||||
-->
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head lang="en">
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Open MCT Web Documentation</title>
|
|
||||||
</head>
|
|
||||||
<body class="user-environ" ng-view>
|
|
||||||
Sections:
|
|
||||||
<ul>
|
|
||||||
<li><a href="api/">API</a></li>
|
|
||||||
<li><a href="architecture/">Architecture Overview</a></li>
|
|
||||||
<li><a href="guide/">Developer Guide</a></li>
|
|
||||||
<li><a href="tutorials/">Tutorials</a></li>
|
|
||||||
<li><a href="process/">Development Process</a></li>
|
|
||||||
</ul>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
35
docs/src/index.md
Normal file
35
docs/src/index.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# OpenMCTWeb Documentation
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Documentation is provided to support the use and development of the
|
||||||
|
OpenMCTWeb mission operations software. It's recommended that before doing
|
||||||
|
any development with OpenMCTWeb you take some time to familiarize yourself
|
||||||
|
with the documentation below.
|
||||||
|
|
||||||
|
OpenMCTWeb provides functionality out of the box, but it's also a framework for
|
||||||
|
building rich mission operations applications based on modern web technology.
|
||||||
|
The framework is configured declaratively, and defines conventions for
|
||||||
|
building on the provided capabilities by creating modular 'bundles' that
|
||||||
|
extend the provided extension points. The details of how to extend the
|
||||||
|
framework are provided in the following documentation.
|
||||||
|
|
||||||
|
## Sections
|
||||||
|
|
||||||
|
* The [Architecture Overview](architecture/) describes the concepts used
|
||||||
|
throughout OpenMCTWeb, and gives a high level overview of the framework's design.
|
||||||
|
|
||||||
|
* The [Developer's guide](guide/) goes into more detail about how to use the
|
||||||
|
framework
|
||||||
|
and the capabilities that it provides.
|
||||||
|
|
||||||
|
* The [Tutorials](tutorials/) give examples of extending the platform to add
|
||||||
|
functionality,
|
||||||
|
and integrate with data sources.
|
||||||
|
|
||||||
|
* The [API](api/) document is generated from inline documentation
|
||||||
|
using jsdoc, and describes the javascript objects and functions that make up
|
||||||
|
the software framework.
|
||||||
|
|
||||||
|
* Finally, the [Development Process](process/) document describes the
|
||||||
|
OpenMCTWeb software development cycle.
|
@ -31,7 +31,7 @@
|
|||||||
"jshint": "jshint platform example || exit 0",
|
"jshint": "jshint platform example || exit 0",
|
||||||
"watch": "karma start",
|
"watch": "karma start",
|
||||||
"jsdoc": "jsdoc -c jsdoc.json -r -d target/docs/api",
|
"jsdoc": "jsdoc -c jsdoc.json -r -d target/docs/api",
|
||||||
"otherdoc": "node docs/gendocs.js --in docs/src --out target/docs",
|
"otherdoc": "node docs/gendocs.js --in docs/src --out target/docs --suppress-toc 'docs/src/index.md|docs/src/process/index.md'",
|
||||||
"docs": "npm run jsdoc ; npm run otherdoc"
|
"docs": "npm run jsdoc ; npm run otherdoc"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
Reference in New Issue
Block a user