repair doc tools and polish the docs code (#5038)

* set private access modifier

* repair doc build tools

* fix lit issues

* re-generate version index
This commit is contained in:
Denys Vuika
2019-08-30 17:26:10 +01:00
committed by Eugenio Romano
parent 3bebc7a18c
commit 2b1250cae7
32 changed files with 727 additions and 877 deletions

View File

@@ -10,25 +10,22 @@ import * as removePosInfo from 'unist-util-remove-position';
import * as MQ from './mqDefs';
let docFilePath = path.resolve('..', '..', 'docs', 'core', 'about.component.md');
let docSrc = fs.readFileSync(docFilePath, 'utf8');
const docFilePath = path.resolve('..', '..', 'docs', 'core', 'about.component.md');
const docSrc = fs.readFileSync(docFilePath, 'utf8');
let tree: MDAST.Root = remark()
.use(frontMatter, ["yaml"])
.parse(docSrc);
.use(frontMatter, ['yaml'])
.parse(docSrc);
tree = removePosInfo(tree);
//console.log(JSON.stringify(tree));
const schema = buildSchema(MQ.schema);
let schema = buildSchema(MQ.schema);
let root = {
const root = {
document: () => new MQ.Root(tree)
};
let query = `
const query = `
{
document {
metadata(key: "Status")
@@ -47,5 +44,6 @@ let query = `
`;
graphql(schema, query, root).then((response) => {
// tslint:disable-next-line: no-console
console.log(JSON.stringify(response));
});
});