Restructuring generate-doc code folder (#5252)
Includes updated docs generation old pipeline, refactored and improved generate-docs code, generating docs in ci and separate pipeline for the new index generation
This commit is contained in:
Родитель
e6cf99c60d
Коммит
211d751c32
|
@ -2,6 +2,8 @@ omitted_paths:
|
|||
- documentation/ServicePrincipal/*
|
||||
- eng/tools/analyze-deps/**
|
||||
- eng/tools/select-packages/**
|
||||
- eng/tools/generate-doc/**
|
||||
- eng/tools/generate-static-index/**
|
||||
- "sdk/*/arm-*"
|
||||
- "sdk/cognitiveservices/*"
|
||||
- "sdk/identity/identity/test/manual/*"
|
||||
|
|
|
@ -1,278 +0,0 @@
|
|||
const fs = require("fs-extra");
|
||||
const path = require("path");
|
||||
const childProcess = require("child_process");
|
||||
const nunjucks = require("nunjucks");
|
||||
|
||||
nunjucks.configure("documentation/templateDocGen", { autoescape: true });
|
||||
|
||||
/* Traversing the directory */
|
||||
function walk(dir, checks) {
|
||||
var list = fs.readdirSync(dir);
|
||||
for (const fileName of list) {
|
||||
const filePath = path.join(dir, fileName);
|
||||
if (fileName == "node_modules") {
|
||||
checks.isRush = true;
|
||||
continue;
|
||||
}
|
||||
if (fileName == "src") {
|
||||
checks.srcPresent = true;
|
||||
}
|
||||
if (fileName == "package.json") {
|
||||
let data = fs.readFileSync(filePath, "utf8");
|
||||
let settings = JSON.parse(data);
|
||||
if (settings["private"] === true) {
|
||||
checks.isPrivate = true;
|
||||
}
|
||||
}
|
||||
if (fileName == "typedoc.json") {
|
||||
checks.typedocPresent = true;
|
||||
}
|
||||
const stat = fs.statSync(filePath);
|
||||
if (stat && stat.isDirectory()) {
|
||||
checks = walk(filePath, checks);
|
||||
}
|
||||
}
|
||||
return checks;
|
||||
}
|
||||
|
||||
/* Checking if a package exists in the exclusion/ inclusion list */
|
||||
function isPackageInArray(package, inputArray) {
|
||||
for (var i in inputArray) {
|
||||
if (inputArray[i] == package) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Input arguments to the script */
|
||||
var argv = require("yargs")
|
||||
.options({
|
||||
docGenOutput: {
|
||||
alias: "dgOp",
|
||||
type: "string",
|
||||
choices: ["dg", "local"],
|
||||
describe:
|
||||
"If value = dg, generate the docs in root/docGen folder, else generated under dist/docs/ of local package",
|
||||
demandOption: true
|
||||
},
|
||||
includeMode: {
|
||||
alias: "i",
|
||||
type: "string",
|
||||
describe:
|
||||
"select whether there is inclusion mode, exclusion mode or neither",
|
||||
choices: ["inc", "exc", "none"],
|
||||
demandOption: true
|
||||
},
|
||||
include: {
|
||||
alias: "inc",
|
||||
type: "array",
|
||||
describe:
|
||||
"inclusion list of packages for which the docs should be generated. The index template html is not created in this mode."
|
||||
},
|
||||
exclude: {
|
||||
alias: "exc",
|
||||
type: "array",
|
||||
describe:
|
||||
"exclusion list for packages for which the docs should be NOT generated.These packages will be added to index template html generated."
|
||||
}
|
||||
})
|
||||
.demandOption(
|
||||
["docGenOutput", "includeMode"],
|
||||
"Please provide both docGen and includeMode arguments to work with this tool"
|
||||
)
|
||||
.help().argv;
|
||||
|
||||
/* Variables for inclusion or exclusion package lists */
|
||||
let exclusionList = [];
|
||||
let inclusionList = [];
|
||||
|
||||
/* Generate index html from the template by default */
|
||||
let generateIndexWithTemplate = true;
|
||||
if((argv.dgOp === "local") && (argv.includeMode !== "none")){
|
||||
console.error(`--includeMode "inc" or "exc" is supported only when the documentGenoutput is set to "dg" instead of "local"!!`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (argv.includeMode === "inc") {
|
||||
generateIndexWithTemplate = false;
|
||||
if (argv.include !== undefined) {
|
||||
inclusionList = argv.include;
|
||||
} else {
|
||||
console.error(`--includeMode "inc" requires the inclusion list --inc to be passed as an argument!!`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
else if(argv.includeMode === "exc"){
|
||||
if(argv.exclude !== undefined) {
|
||||
exclusionList = argv.exclude;
|
||||
} else {
|
||||
console.error(`--excludeMode "exc" requires the exclusion list --exc to be passed as an argument!!`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
else if((argv.includeMode === "none")){
|
||||
generateIndexWithTemplate = false;
|
||||
}
|
||||
|
||||
let docOutputFolder = "--out ./dist/docs ./src";
|
||||
|
||||
console.log("process.cwd = " + process.cwd());
|
||||
try {
|
||||
const result = childProcess.spawnSync("rush", ["install"], {
|
||||
cwd: process.cwd(),
|
||||
env: process.env,
|
||||
shell: true
|
||||
});
|
||||
console.log('result.output for "rush install":' + result.output);
|
||||
} catch (e) {
|
||||
console.error(`\n\n${e.toString()}\n\n`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
let workingDir = path.join(process.cwd(), "sdk");
|
||||
let pathToAssets = "";
|
||||
|
||||
const serviceFolders = fs.readdirSync(workingDir);
|
||||
|
||||
/* Initializing package list for template index generation */
|
||||
let serviceList = [];
|
||||
let count = 0;
|
||||
for (const eachService of serviceFolders) {
|
||||
count++;
|
||||
console.log("count = " + count);
|
||||
const eachServicePath = path.join(workingDir, eachService);
|
||||
const stat = fs.statSync(eachServicePath);
|
||||
|
||||
if (stat && stat.isDirectory()) {
|
||||
var packageList = fs.readdirSync(eachServicePath);
|
||||
|
||||
/* Initializing package list for template index generation */
|
||||
let indexPackageList = [];
|
||||
for (const eachPackage of packageList) {
|
||||
if ((argv.includeMode === "inc" && isPackageInArray(eachPackage, inclusionList)) || !(argv.includeMode === "inc")) {
|
||||
let checks = {
|
||||
isRush: false,
|
||||
isPrivate: false,
|
||||
srcPresent: false,
|
||||
typedocPresent: false
|
||||
};
|
||||
console.log(
|
||||
"checks before walk: checks.isRush = " + checks.isRush +
|
||||
" , checks.isPrivate = " + checks.isPrivate +
|
||||
", checks.srcPresent = " + checks.srcPresent +
|
||||
", typedocPresent = " + checks.typedocPresent
|
||||
);
|
||||
eachPackagePath = path.join(eachServicePath, eachPackage);
|
||||
pathToAssets = eachPackagePath + "/assets";
|
||||
const packageStat = fs.statSync(eachPackagePath);
|
||||
if (packageStat && packageStat.isDirectory()) {
|
||||
checks = walk(eachPackagePath, checks);
|
||||
|
||||
console.log(
|
||||
"checks after walk: checks.isRush = " + checks.isRush +
|
||||
" , checks.isPrivate = " + checks.isPrivate +
|
||||
", checks.srcPresent = " + checks.srcPresent +
|
||||
", typedocPresent = " + checks.typedocPresent
|
||||
);
|
||||
console.log("Path: " + eachPackagePath);
|
||||
if (!checks.isPrivate) {
|
||||
if (checks.srcPresent) {
|
||||
if (!checks.isRush) {
|
||||
try {
|
||||
const npmResult = childProcess.spawnSync("npm", ["install"], {
|
||||
stdio: "inherit",
|
||||
cwd: eachPackagePath,
|
||||
shell: true
|
||||
});
|
||||
console.log('npmResult.output for "npm install":' + npmResult.output);
|
||||
} catch (e) {
|
||||
console.error(`\n\n${e.toString()}\n\n`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
if (argv.docGenOutput === "dg") {
|
||||
docOutputFolder = "--out ../../../docGen/" + eachPackage + " ./src";
|
||||
}
|
||||
|
||||
try {
|
||||
if (!isPackageInArray(eachPackage, exclusionList)) {
|
||||
if (checks.typedocPresent) {
|
||||
const typedocResult = childProcess.spawnSync(
|
||||
"typedoc",
|
||||
[docOutputFolder,
|
||||
"--ignoreCompilerErrors"],
|
||||
{
|
||||
cwd: eachPackagePath,
|
||||
shell: true
|
||||
}
|
||||
);
|
||||
console.log('typedocResult.output for "typedoc ' + docOutputFolder +' ":' + typedocResult.output);
|
||||
} else {
|
||||
const typedocResult = childProcess.spawnSync(
|
||||
"typedoc",
|
||||
[
|
||||
"--excludePrivate",
|
||||
"--excludeNotExported",
|
||||
'--exclude "node_modules/**/*"',
|
||||
"--ignoreCompilerErrors",
|
||||
"--mode file",
|
||||
docOutputFolder
|
||||
],
|
||||
{
|
||||
cwd: eachPackagePath,
|
||||
shell: true
|
||||
}
|
||||
);
|
||||
console.log(
|
||||
'typedocResult.output for "typedoc --excludePrivate --excludeNotExported --exclude "node_modules/**/*" -ignoreCompilerErrors --mode file ' + docOutputFolder + ' ":' + typedocResult.output);
|
||||
}
|
||||
} else {
|
||||
console.log("... NOT RUNNING TYPEDOC on excluded package " + eachPackage);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(`\n\n${e.toString()}\n\n`);
|
||||
process.exit(1);
|
||||
}
|
||||
if (generateIndexWithTemplate) {
|
||||
/* Adding package to packageList for the template index generation */
|
||||
indexPackageList.push(eachPackage);
|
||||
}
|
||||
} else {
|
||||
console.log("...SKIPPING Since src folder could not be found.....");
|
||||
}
|
||||
} else {
|
||||
console.log("...SKIPPING Since package marked as private...");
|
||||
}
|
||||
}
|
||||
}
|
||||
} //end-for each-package
|
||||
/* Adding service entry for the template index generation */
|
||||
serviceList.push({ name: eachService, packageList: indexPackageList });
|
||||
}
|
||||
} // end-for ServiceFolders
|
||||
console.log("generateIndexWithTemplate=" + generateIndexWithTemplate);
|
||||
if (generateIndexWithTemplate) {
|
||||
var renderedIndex = nunjucks.render("template.html", {
|
||||
serviceList: serviceList
|
||||
});
|
||||
|
||||
var dest = process.cwd() + "/docGen/index.html";
|
||||
fs.writeFile(dest, renderedIndex, function(err, result) {
|
||||
if (err)
|
||||
console.log("error in writing the generated html to docGen/index.html", err);
|
||||
console.log("Generated html written to docGen/index.html");
|
||||
});
|
||||
|
||||
console.log("serviceList length = " + serviceList.length);
|
||||
if (serviceList.length > 0) {
|
||||
/* Copy from pathToAssets to docGen/assets */
|
||||
pathToAssets = process.cwd() + "/docGen/" + serviceList[0].packageList[0] + "/assets";
|
||||
var assetsDest = process.cwd() + "/docGen/assets/";
|
||||
fs.copy(pathToAssets, assetsDest, err => {
|
||||
if (err)
|
||||
return console.error("error copying the assets folder to docGen/assets/",err);
|
||||
console.log("assets folder copied to docGen!");
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
jobs:
|
||||
- job: "Build"
|
||||
variables:
|
||||
- template: templates/variables/globals.yml
|
||||
pool:
|
||||
vmImage: "windows-2019"
|
||||
steps:
|
||||
- pwsh: |
|
||||
Invoke-WebRequest -Uri "https://github.com/dotnet/docfx/releases/download/v2.43.2/docfx.zip" `
|
||||
-OutFile "docfx.zip" | Wait-Process; Expand-Archive -Path "docfx.zip" -DestinationPath "./docfx/"
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
displayName: Download and Extract DocFX
|
||||
|
||||
- pwsh: |
|
||||
$(Build.BinariesDirectory)/docfx/docfx.exe init -q
|
||||
displayName: Provision DocFX Directory
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
|
||||
- pwsh: |
|
||||
mkdir "templates"
|
||||
displayName: Create Template Directory
|
||||
workingDirectory: $(Build.SourcesDirectory)/docfx_project/
|
||||
|
||||
- pwsh: |
|
||||
Copy-Item "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/docfx.json" -Destination "$(Build.SourcesDirectory)/docfx_project/" -Force
|
||||
displayName: Copy over docfx.json
|
||||
|
||||
- script: |
|
||||
npm install
|
||||
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/generate-static-index
|
||||
displayName: "Install tool dependencies"
|
||||
|
||||
- pwsh: |
|
||||
node $(Build.SourcesDirectory)/eng/tools/generate-static-index/index.js
|
||||
displayName: "Generate Index Toc"
|
||||
|
||||
- pwsh: |
|
||||
New-Item -Path "$(Build.SourcesDirectory)/docfx_project" -Name "toc.yml" -Force
|
||||
Add-Content -Path "$(Build.SourcesDirectory)/docfx_project/toc.yml" -Value "- name: Azure SDK for JavaScript APIs`r`n href: api/`r`n homepage: api/index.md"
|
||||
Copy-Item "$(Build.SourcesDirectory)/README.md" -Destination "$(Build.SourcesDirectory)/docfx_project/api/index.md" -Force
|
||||
Copy-Item "$(Build.SourcesDirectory)/README.md" -Destination "$(Build.SourcesDirectory)/docfx_project/index.md" -Force
|
||||
displayName: Update toc.yml and index
|
||||
|
||||
- pwsh: |
|
||||
$(Build.BinariesDirectory)/docfx/docfx.exe build
|
||||
displayName: Build Doc Content
|
||||
workingDirectory: $(Build.SourcesDirectory)/docfx_project/
|
||||
|
||||
- pwsh: |
|
||||
Copy-Item "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/assets/*" -Destination "$(Build.SourcesDirectory)/docfx_project/_site/" -Force
|
||||
Get-Content "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/main.js" |Out-File "$(Build.SourcesDirectory)/docfx_project/_site/styles/main.js"
|
||||
Get-Content "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/docfx.css" |Out-File "$(Build.SourcesDirectory)/docfx_project/_site/styles/docfx.css"
|
||||
Copy-Item "$(Build.SourcesDirectory)/docfx_project/*" -Destination "$(Build.ArtifactStagingDirectory)/docfx_project/" -Recursive -Force
|
||||
displayName: Replace site assets and Copy HTML to Artifacts Directory
|
||||
|
||||
- task: PublishPipelineArtifact@0
|
||||
condition: succeeded()
|
||||
inputs:
|
||||
artifactName: "Doc.Index"
|
||||
targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site
|
|
@ -1,5 +1,5 @@
|
|||
#Pipeline variables:
|
||||
# $(additionalArgs) eg : -i "exc" --exc arm-advisor arm-apimanagement OR -i "inc" --inc arm-advisor arm-apimanagement
|
||||
# $(additionalArgs) eg : -i "exc" --exc advisor apimanagement OR -i "inc" --inc advisor apimanagement storage OR -i "inc" --inc eventhub --clientOnly
|
||||
|
||||
trigger:
|
||||
- master
|
||||
|
@ -34,20 +34,13 @@ jobs:
|
|||
displayName: "Install typedoc"
|
||||
|
||||
- script: |
|
||||
npm install nunjucks
|
||||
displayName: "Install nunjucks"
|
||||
|
||||
- script: |
|
||||
npm install fs-extra
|
||||
displayName: "Install fs-extra"
|
||||
|
||||
- script: |
|
||||
npm install yargs
|
||||
displayName: "Install yargs"
|
||||
npm install
|
||||
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/generate-doc
|
||||
displayName: "Install tool dependencies"
|
||||
|
||||
- pwsh: |
|
||||
cd $(Build.SourcesDirectory)
|
||||
node .\common\scripts\generate-doc.js --dgOp "dg" $(additionalArgs)
|
||||
node .\eng\tools\generate-doc\index.js --dgOp "dg" $(additionalArgs)
|
||||
Copy-Item -Path $(Build.SourcesDirectory)/docGen/* -Destination $(Build.ArtifactStagingDirectory) -Recurse -Force
|
||||
displayName: "Generate Typedoc Docs"
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
parameters:
|
||||
RunUnitTests: true
|
||||
Artifacts: []
|
||||
ServiceDirectory: not-specified
|
||||
Matrix:
|
||||
Linux_Node8:
|
||||
OSVmImage: "ubuntu-16.04"
|
||||
|
@ -49,6 +51,13 @@ jobs:
|
|||
node common/scripts/install-run-rush.js install
|
||||
displayName: "Install dependencies"
|
||||
|
||||
- template: eng/pipelines/templates/scripts/replace-relative-links.yml@azure-sdk-tools
|
||||
parameters:
|
||||
TargetFolder: $(Build.SourcesDirectory)/sdk/${{parameters.ServiceDirectory}}
|
||||
RootFolder: $(Build.SourcesDirectory)
|
||||
BuildSHA: $(Build.SourceVersion)
|
||||
RepoId: "Azure/azure-sdk-for-js"
|
||||
|
||||
- script: |
|
||||
node eng/tools/rush-runner.js build "${{parameters.ServiceDirectory}}" --verbose
|
||||
displayName: "Build libraries"
|
||||
|
@ -76,6 +85,32 @@ jobs:
|
|||
artifactName: packages
|
||||
path: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- script: |
|
||||
npm i -g typedoc
|
||||
displayName: "Install typedoc"
|
||||
|
||||
- script: |
|
||||
npm install
|
||||
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/generate-doc
|
||||
displayName: "Install tool dependencies"
|
||||
|
||||
- pwsh: |
|
||||
$docDirectory = "${{parameters.ServiceDirectory}}"
|
||||
if ($docDirectory -eq '*') { $docDirectory = "core" }
|
||||
node $(Build.SourcesDirectory)/eng/tools/generate-doc/index.js --dgOp "dg" -i "inc" --inc "$docDirectory"
|
||||
displayName: "Run Typedoc Docs"
|
||||
|
||||
- pwsh: |
|
||||
$(Build.SourcesDirectory)/eng/tools/compress-subfolders.ps1 "$(Build.SourcesDirectory)/docGen" "$(Build.ArtifactStagingDirectory)/Documentation"
|
||||
displayName: "Generate Typedoc Docs"
|
||||
|
||||
- task: PublishPipelineArtifact@1
|
||||
condition: succeededOrFailed()
|
||||
displayName: "Publish artifacts"
|
||||
inputs:
|
||||
artifactName: documentation
|
||||
path: $(Build.ArtifactStagingDirectory)/Documentation
|
||||
|
||||
- job: "Analyze"
|
||||
dependsOn: "Build"
|
||||
variables:
|
||||
|
@ -107,7 +142,8 @@ jobs:
|
|||
targetPath: "$(Agent.TempDirectory)/packagesMaster"
|
||||
displayName: "Download Latest Master (PipelineTask) artifacts"
|
||||
|
||||
- pwsh: eng/tools/compare-packages.ps1 "$(Agent.TempDirectory)/packagesMaster" "$(Agent.TempDirectory)/packagesCurrent" "$(Build.BuildNumber)" "$(System.ArtifactsDirectory)"
|
||||
- pwsh: |
|
||||
eng/tools/compare-packages.ps1 "$(Agent.TempDirectory)/packagesMaster" "$(Agent.TempDirectory)/packagesCurrent" "$(Build.BuildNumber)" "$(System.ArtifactsDirectory)"
|
||||
displayName: "Diff Generated Packages"
|
||||
errorActionPreference: "continue"
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
param (
|
||||
$pathToDir,
|
||||
$pathToDest
|
||||
)
|
||||
if((-Not (Test-Path $pathToDir))){
|
||||
mkdir $pathToDir
|
||||
}
|
||||
$source = Get-ChildItem -Path $pathToDir -Directory
|
||||
Write-Host "source = $source"
|
||||
|
||||
if((-Not (Test-Path $pathToDest))){
|
||||
mkdir $pathToDest
|
||||
}
|
||||
|
||||
Foreach ($s in $source){
|
||||
$destination = Join-path -path $pathToDest -ChildPath "$($s.name).zip"
|
||||
Write-Host "destination = $destination"
|
||||
Compress-Archive -Path $s.fullname -DestinationPath $destination
|
||||
}
|
|
@ -0,0 +1,339 @@
|
|||
const fs = require("fs-extra");
|
||||
const path = require("path");
|
||||
const util = require("util");
|
||||
const childProcess = require("child_process");
|
||||
const nunjucks = require("nunjucks");
|
||||
const readFile = util.promisify(fs.readFile);
|
||||
const readDir = util.promisify(fs.readdir);
|
||||
const statFile = util.promisify(fs.stat);
|
||||
const pLimit = require('p-limit');
|
||||
|
||||
nunjucks.configure("documentation/templateDocGen", { autoescape: true });
|
||||
|
||||
/* Traversing the directory */
|
||||
const walk = async (dir, checks) => {
|
||||
checks = await walkRecurse(dir, checks, 0);
|
||||
return checks;
|
||||
};
|
||||
|
||||
const walkRecurse = async (dir, checks, depth) => {
|
||||
if (depth > 0) return checks;
|
||||
var list = await readDir(dir);
|
||||
for (const fileName of list) {
|
||||
const filePath = path.join(dir, fileName);
|
||||
if (fileName == "node_modules") {
|
||||
continue;
|
||||
}
|
||||
if (fileName == "src") {
|
||||
checks.srcPresent = true;
|
||||
}
|
||||
if (fileName == "package.json") {
|
||||
let data = await readFile(filePath, "utf8");
|
||||
let settings = JSON.parse(data);
|
||||
if (settings["private"] === true) {
|
||||
checks.isPrivate = true;
|
||||
}
|
||||
if (settings["sdk-type"] === "client") {
|
||||
checks.isClient = true;
|
||||
}
|
||||
checks.version = settings["version"];
|
||||
}
|
||||
if (fileName == "typedoc.json") {
|
||||
checks.typedocPresent = true;
|
||||
}
|
||||
const stat = await statFile(filePath);
|
||||
if (stat && stat.isDirectory()) {
|
||||
checks = await walkRecurse(filePath, checks, depth + 1);
|
||||
}
|
||||
}
|
||||
return checks;
|
||||
};
|
||||
|
||||
//Old Method Index
|
||||
const generateOldIndex = serviceList => {
|
||||
console.log("generateIndexWithTemplate=" + generateIndexWithTemplate);
|
||||
if (generateIndexWithTemplate) {
|
||||
var renderedIndex = nunjucks.render("template.html", {
|
||||
serviceList: serviceList
|
||||
});
|
||||
|
||||
var dest = process.cwd() + "/docGen/index.html";
|
||||
fs.writeFile(dest, renderedIndex, function(err, result) {
|
||||
if (err)
|
||||
console.log(
|
||||
"error in writing the generated html to docGen/index.html",
|
||||
err
|
||||
);
|
||||
console.log("Generated html written to docGen/index.html");
|
||||
});
|
||||
|
||||
console.log("serviceList length = " + serviceList.length);
|
||||
if (serviceList.length > 0) {
|
||||
/* Copy from pathToAssets to docGen/assets */
|
||||
pathToAssets =
|
||||
process.cwd() + "/docGen/" + serviceList[0].packageList[0] + "/assets";
|
||||
var assetsDest = process.cwd() + "/docGen/assets/";
|
||||
fs.copy(pathToAssets, assetsDest, err => {
|
||||
if (err)
|
||||
return console.error(
|
||||
"error copying the assets folder to docGen/assets/",
|
||||
err
|
||||
);
|
||||
console.log("assets folder copied to docGen!");
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const executeTypedoc = async (
|
||||
exclusionList,
|
||||
inclusionList,
|
||||
generateIndexWithTemplate
|
||||
) => {
|
||||
console.log("inside executeTypedoc");
|
||||
let docOutputFolder = "--out ./dist/docs ./src";
|
||||
console.log("process.cwd = " + process.cwd());
|
||||
let workingDir = path.join(process.cwd(), "sdk");
|
||||
let pathToAssets = "";
|
||||
const serviceFolders = await readDir(workingDir);
|
||||
|
||||
/* Initializing package list for template index generation */
|
||||
let serviceList = [];
|
||||
let promises = [];
|
||||
let commandList = [];
|
||||
for (const eachService of serviceFolders) {
|
||||
if (
|
||||
(argv.includeMode === "inc" && inclusionList.includes(eachService)) ||
|
||||
(argv.includeMode === "exc" && !exclusionList.includes(eachService)) ||
|
||||
(argv.includeMode === "inc" && argv.include[0] === "*")
|
||||
) {
|
||||
const eachServicePath = path.join(workingDir, eachService);
|
||||
const stat = await statFile(eachServicePath);
|
||||
|
||||
if (stat && stat.isDirectory()) {
|
||||
var packageList = await readDir(eachServicePath);
|
||||
|
||||
/* Initializing package list for template index generation */
|
||||
let indexPackageList = [];
|
||||
for (var eachPackage of packageList) {
|
||||
let checks = {
|
||||
isPrivate: false,
|
||||
srcPresent: false,
|
||||
typedocPresent: false,
|
||||
isClient: false,
|
||||
version: "0"
|
||||
};
|
||||
eachPackagePath = path.join(eachServicePath, eachPackage);
|
||||
pathToAssets = eachPackagePath + "/assets";
|
||||
const packageStat = await statFile(eachPackagePath);
|
||||
if (packageStat && packageStat.isDirectory()) {
|
||||
checks = await walk(eachPackagePath, checks);
|
||||
|
||||
console.log(
|
||||
"checks after walk: checks.isPrivate = " +
|
||||
checks.isPrivate +
|
||||
", checks.srcPresent = " +
|
||||
checks.srcPresent +
|
||||
", typedocPresent = " +
|
||||
checks.typedocPresent +
|
||||
", isClient = " +
|
||||
checks.isClient +
|
||||
", version = " +
|
||||
checks.version
|
||||
);
|
||||
console.log("Path: " + eachPackagePath);
|
||||
if (!checks.isPrivate) {
|
||||
if ((argv.clientOnly && checks.isClient) || !argv.clientOnly) {
|
||||
if (checks.srcPresent) {
|
||||
if (argv.docGenOutput === "dg") {
|
||||
docOutputFolder =
|
||||
"--out ../../../docGen/" +
|
||||
eachPackage +
|
||||
"/" +
|
||||
checks.version +
|
||||
" ./src";
|
||||
}
|
||||
|
||||
let typedocProcess;
|
||||
let commandRun = [];
|
||||
commandRun.push("typedoc");
|
||||
commandRun.push({
|
||||
cwd: eachPackagePath,
|
||||
shell: true
|
||||
});
|
||||
if (checks.typedocPresent) {
|
||||
commandRun.push([
|
||||
docOutputFolder,
|
||||
'--theme "../../../eng/tools/generate-doc/theme/default"',
|
||||
"--ignoreCompilerErrors"
|
||||
]);
|
||||
} else {
|
||||
commandRun.push([
|
||||
'--theme "../../../eng/tools/generate-doc/theme/default"',
|
||||
"--excludePrivate",
|
||||
"--excludeNotExported",
|
||||
'--exclude "node_modules/**/*"',
|
||||
"--ignoreCompilerErrors",
|
||||
"--mode file",
|
||||
docOutputFolder
|
||||
]);
|
||||
}
|
||||
commandList.push(commandRun);
|
||||
if (generateIndexWithTemplate) {
|
||||
/* Adding package to packageList for the template index generation */
|
||||
indexPackageList.push(eachPackage);
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
"...SKIPPING Since src folder could not be found....."
|
||||
);
|
||||
}
|
||||
} else {
|
||||
//console.log("...SKIPPING Since package is either not sdkType client");
|
||||
}
|
||||
} else {
|
||||
console.log("...SKIPPING Since package marked as private...");
|
||||
}
|
||||
}
|
||||
} //end-for each-package
|
||||
|
||||
/* Adding service entry for the template index generation */
|
||||
serviceList.push({ name: eachService, packageList: indexPackageList });
|
||||
}
|
||||
} else {
|
||||
//console.log("...SKIPPING Since service doesn't satisfy one of the 3 condition checks...");
|
||||
}
|
||||
} // end-for ServiceFolders
|
||||
|
||||
|
||||
var plimitPromises = [];
|
||||
const limit = pLimit(20);
|
||||
for (const commandRun of commandList) {
|
||||
const promise = limit(()=> new Promise(async (res, rej) => {
|
||||
|
||||
let typedocProcess = childProcess.spawn(commandRun[0], commandRun[2], commandRun[1]);
|
||||
let stdOut = "";
|
||||
let stdErr = "";
|
||||
typedocProcess.on("close", code => {
|
||||
res({ code, stdOut, stdErr })
|
||||
});
|
||||
|
||||
typedocProcess.stdout.on("data", data => (stdOut = stdOut + data.toString()));
|
||||
typedocProcess.stderr.on("data", data => (stdErr = stdErr + data.toString()));
|
||||
|
||||
}));
|
||||
plimitPromises.push(promise);
|
||||
}
|
||||
try {
|
||||
const results = await Promise.all(plimitPromises);
|
||||
for (let item of results) {
|
||||
console.log(item.stdOut);
|
||||
if (item.stdErr) {
|
||||
console.error(item.stdErr);
|
||||
}
|
||||
if (item.code !== 0) {
|
||||
console.error("Process Failed");
|
||||
process.exitCode = 1;
|
||||
}
|
||||
}
|
||||
} catch (ex) {
|
||||
console.log("ERROR", ex);
|
||||
}
|
||||
|
||||
console.log("All done!");
|
||||
if (argv.oldIndex) generateOldIndex(serviceList);
|
||||
};
|
||||
|
||||
/* Input arguments to the script */
|
||||
var argv = require("yargs")
|
||||
.options({
|
||||
docGenOutput: {
|
||||
alias: "dgOp",
|
||||
type: "string",
|
||||
choices: ["dg", "local"],
|
||||
describe:
|
||||
"If value = dg, generate the docs in root/docGen folder, else generated under dist/docs/ of local package",
|
||||
demandOption: true
|
||||
},
|
||||
includeMode: {
|
||||
alias: "i",
|
||||
type: "string",
|
||||
describe:
|
||||
"select whether there is inclusion mode, exclusion mode or neither",
|
||||
choices: ["inc", "exc", "none"],
|
||||
demandOption: true
|
||||
},
|
||||
include: {
|
||||
alias: "inc",
|
||||
type: "array",
|
||||
describe:
|
||||
"inclusion list of packages for which the docs should be generated. The index template html is not created in this mode."
|
||||
},
|
||||
exclude: {
|
||||
alias: "exc",
|
||||
type: "array",
|
||||
describe:
|
||||
"exclusion list for packages for which the docs should be NOT generated.These packages will be added to index template html generated."
|
||||
},
|
||||
clientOnly: {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
demandOption: true
|
||||
},
|
||||
oldIndex: {
|
||||
type: "boolean",
|
||||
default: false,
|
||||
demandOption: true
|
||||
}
|
||||
})
|
||||
.demandOption(
|
||||
["docGenOutput", "includeMode", "clientOnly"],
|
||||
"Please provide both docGen, includeMode and clientOnly arguments to work with this tool"
|
||||
)
|
||||
.help().argv;
|
||||
|
||||
console.log("Argv.clientOnly = " + argv.clientOnly);
|
||||
/* Variables for inclusion or exclusion package lists */
|
||||
let exclusionList = [];
|
||||
let inclusionList = [];
|
||||
let generateIndexWithTemplate = true; /* Generate index html from the template by default */
|
||||
|
||||
if (argv.dgOp === "local" && argv.includeMode !== "none") {
|
||||
console.error(
|
||||
`--includeMode "inc" or "exc" is supported only when the documentGenoutput is set to "dg" instead of "local"!!`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log("arv.include = " + argv.include);
|
||||
|
||||
if (argv.includeMode === "inc") {
|
||||
if (argv.oldIndex) {
|
||||
generateIndexWithTemplate = false;
|
||||
}
|
||||
if (argv.include !== undefined) {
|
||||
inclusionList = argv.include;
|
||||
if (inclusionList.includes("not-specified")) {
|
||||
console.error(
|
||||
`One or more value to the input package list is "not-specified"`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
} else {
|
||||
console.error(
|
||||
`--includeMode "inc" requires the inclusion list --inc to be passed as an argument!!`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
} else if (argv.includeMode === "exc") {
|
||||
if (argv.exclude !== undefined) {
|
||||
exclusionList = argv.exclude;
|
||||
} else {
|
||||
console.error(
|
||||
`--excludeMode "exc" requires the exclusion list --exc to be passed as an argument!!`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
} else if (argv.includeMode === "none") {
|
||||
generateIndexWithTemplate = false;
|
||||
}
|
||||
executeTypedoc(exclusionList, inclusionList, generateIndexWithTemplate);
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "generate-doc",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"generate-doc": "node index.js"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs-extra": "^8.1.0",
|
||||
"js-yaml": "^3.13.1",
|
||||
"nunjucks": "^3.2.0",
|
||||
"typedoc": "^0.15.0",
|
||||
"yargs": "^11.1.0",
|
||||
"p-limit": "^2.2.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
h1 { line-height: normal; }
|
|
@ -0,0 +1,144 @@
|
|||
WINDOW_CONTENTS = window.location.href.split("/");
|
||||
|
||||
function currentVersion() {
|
||||
if (WINDOW_CONTENTS.includes("$web") && WINDOW_CONTENTS.length > 5) {
|
||||
return WINDOW_CONTENTS[6];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function currentPackage() {
|
||||
if (WINDOW_CONTENTS.includes("$web") && WINDOW_CONTENTS.length > 5) {
|
||||
return WINDOW_CONTENTS[5];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function httpGetAsync(targetUrl, callback) {
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.onreadystatechange = function() {
|
||||
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
|
||||
callback(xmlHttp.responseText);
|
||||
};
|
||||
xmlHttp.open("GET", targetUrl, true); // true for asynchronous
|
||||
xmlHttp.send(null);
|
||||
}
|
||||
|
||||
function showSelectors(selectors) {
|
||||
selectors.forEach(function(item, index) {
|
||||
$(item).show();
|
||||
});
|
||||
}
|
||||
|
||||
function hideSelectors(selectors) {
|
||||
selectors.forEach(function(item, index) {
|
||||
$(item).hide();
|
||||
});
|
||||
}
|
||||
|
||||
function populateOptions(optionSelector, otherSelectors) {
|
||||
if (currentPackage()) {
|
||||
var versionRequestUrl =
|
||||
"https://azuresdkdocs.blob.core.windows.net/$web?restype=container&comp=list&prefix=" +
|
||||
SELECTED_LANGUAGE +
|
||||
"/" +
|
||||
currentPackage() +
|
||||
"/versions/";
|
||||
|
||||
httpGetAsync(versionRequestUrl, function(responseText) {
|
||||
if (responseText) {
|
||||
data_stored = responseText;
|
||||
|
||||
parser = new DOMParser();
|
||||
xmlDoc = parser.parseFromString(responseText, "text/xml");
|
||||
|
||||
nameElements = Array.from(xmlDoc.getElementsByTagName("Name"));
|
||||
options = [];
|
||||
|
||||
for (var i in nameElements) {
|
||||
options.push(nameElements[i].textContent.split("/")[3]);
|
||||
}
|
||||
|
||||
populateVersionDropDown(optionSelector, options);
|
||||
showSelectors(otherSelectors);
|
||||
|
||||
$(optionSelector).change(function() {
|
||||
targetVersion = $(this).val();
|
||||
|
||||
url = WINDOW_CONTENTS.slice();
|
||||
url[6] = targetVersion;
|
||||
window.location.href = url.join("/");
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function populateVersionDropDown(selector, values) {
|
||||
var select = $(selector);
|
||||
|
||||
$("option", select).remove();
|
||||
|
||||
$.each(values, function(index, text) {
|
||||
$("<option/>", { value: text, text: text }).appendTo(select);
|
||||
});
|
||||
select.val(currentVersion());
|
||||
}
|
||||
|
||||
function getPackageUrl(language, package, version) {
|
||||
return (
|
||||
"https://azuresdkdocs.blob.core.windows.net/$web/" +
|
||||
language +
|
||||
"/" +
|
||||
package +
|
||||
"/" +
|
||||
version +
|
||||
"/index.html"
|
||||
);
|
||||
}
|
||||
|
||||
function populateIndexList(selector, packageName) {
|
||||
url =
|
||||
"https://azuresdkdocs.blob.core.windows.net/$web?restype=container&comp=list&prefix=" +
|
||||
SELECTED_LANGUAGE +
|
||||
"/" +
|
||||
packageName +
|
||||
"/versions/";
|
||||
|
||||
httpGetAsync(url, function(responseText) {
|
||||
if (responseText) {
|
||||
parser = new DOMParser();
|
||||
xmlDoc = parser.parseFromString(responseText, "text/xml");
|
||||
|
||||
nameElements = Array.from(xmlDoc.getElementsByTagName("Name"));
|
||||
options = [];
|
||||
|
||||
for (var i in nameElements) {
|
||||
options.push(nameElements[i].textContent.split("/")[3]);
|
||||
}
|
||||
|
||||
for (var i in options) {
|
||||
$(selector).append(
|
||||
'<li><a target="new" href="' +
|
||||
getPackageUrl(SELECTED_LANGUAGE, packageName, options[i]) +
|
||||
'">' +
|
||||
options[i] +
|
||||
"</a></li>"
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$(selector).append(
|
||||
"<li>No discovered versions present in blob storage.</li>"
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// language specific
|
||||
SELECTED_LANGUAGE = "javascript";
|
||||
populateOptions("#versionSelector", [
|
||||
"#versionSelector",
|
||||
"#versionSelectorHeader"
|
||||
]);
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -0,0 +1,55 @@
|
|||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<script src="{{relativeURL "assets/js/jquery-3.4.1.min.js"}}"></script>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{#ifCond model.name '==' project.name}}{{project.name}}{{else}}{{model.name}} | {{project.name}}{{/ifCond}}
|
||||
</title>
|
||||
<meta name="description" content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="stylesheet" href="{{relativeURL "assets/css/main.css"}}">
|
||||
<link rel="stylesheet" href="{{relativeURL "assets/css/custom.css"}}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{{> header}}
|
||||
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
{{{contents}}}
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
{{#each navigation.children}}
|
||||
{{> navigation}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
{{#each toc.children}}
|
||||
{{> toc.root}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{> footer}}
|
||||
|
||||
<div class="overlay"></div>
|
||||
<script src="{{relativeURL "assets/js/main.js"}}"></script>
|
||||
<script>if (location.protocol == 'file:') document.write('<script src="{{relativeURL "assets/js/search.js"}}"><' + '/script>');</script>
|
||||
|
||||
{{> analytics}}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,78 @@
|
|||
<header>
|
||||
<script src="{{relativeURL "assets/js/get_options.js"}}"></script>
|
||||
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="{{relativeURL "assets/js/search.js"}}" data-base="{{relativeURL "./"}}">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="https://azure.github.io/azure-sdk-for-js" class="title">Back To Index</a> |
|
||||
<a href="{{relativeURL "index.html"}}" class="title">{{project.name}}</a>
|
||||
</div>
|
||||
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
|
||||
{{#unless settings.excludeExternals}}
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
{{/unless}}
|
||||
|
||||
{{#unless settings.excludeNotExported}}
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
{{#with model}}{{> breadcrumb}}{{/with}}
|
||||
</ul>
|
||||
<h1>{{#compact}}
|
||||
{{model.kindString}}
|
||||
{{model.name}}
|
||||
{{#if model.typeParameters}}
|
||||
<
|
||||
{{#each model.typeParameters}}
|
||||
{{#if @index}}, {{/if}}
|
||||
{{name}}
|
||||
{{/each}}
|
||||
>
|
||||
{{/if}}
|
||||
{{/compact}}</h1>
|
||||
|
||||
<p class="caption" id="versionSelectorHeader">Package version
|
||||
<select value="myValue" id="versionSelector">
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
|
@ -0,0 +1,137 @@
|
|||
const fs = require("fs-extra");
|
||||
const path = require("path");
|
||||
var jsyaml = require("js-yaml");
|
||||
|
||||
/* Traversing the directory */
|
||||
const walk = (dir, checks) => {
|
||||
var list = fs.readdirSync(dir);
|
||||
for (const fileName of list) {
|
||||
const filePath = path.join(dir, fileName);
|
||||
if (fileName == "node_modules") {
|
||||
checks.isRush = true;
|
||||
continue;
|
||||
}
|
||||
if (fileName == "src") {
|
||||
checks.srcPresent = true;
|
||||
}
|
||||
if (fileName == "package.json") {
|
||||
let data = fs.readFileSync(filePath, "utf8");
|
||||
let settings = JSON.parse(data);
|
||||
if (settings["private"] === true) {
|
||||
checks.isPrivate = true;
|
||||
}
|
||||
if(settings["sdk-type"] === "client"){
|
||||
checks.isClient = true;
|
||||
}
|
||||
checks.version = settings["version"];
|
||||
}
|
||||
if (fileName == "typedoc.json") {
|
||||
checks.typedocPresent = true;
|
||||
}
|
||||
const stat = fs.statSync(filePath);
|
||||
if (stat && stat.isDirectory()) {
|
||||
checks = walk(filePath, checks);
|
||||
}
|
||||
}
|
||||
return checks;
|
||||
};
|
||||
|
||||
console.log("process.cwd = " + process.cwd());
|
||||
|
||||
let workingDir = path.join(process.cwd(), "sdk");
|
||||
const serviceFolders = fs.readdirSync(workingDir);
|
||||
|
||||
/* Initializing package list for template index generation */
|
||||
let serviceList = [];
|
||||
for (const eachService of serviceFolders) {
|
||||
const eachServicePath = path.join(workingDir, eachService);
|
||||
const stat = fs.statSync(eachServicePath);
|
||||
|
||||
if (stat && stat.isDirectory()) {
|
||||
var packageList = fs.readdirSync(eachServicePath);
|
||||
|
||||
/* Initializing package list for template index generation */
|
||||
let mngmtList = [];
|
||||
let clientList = [];
|
||||
for (var eachPackage of packageList) {
|
||||
let checks = {
|
||||
isRush: false,
|
||||
isPrivate: false,
|
||||
srcPresent: false,
|
||||
typedocPresent: false,
|
||||
isClient: false,
|
||||
version: "0"
|
||||
};
|
||||
eachPackagePath = path.join(eachServicePath, eachPackage);
|
||||
const packageStat = fs.statSync(eachPackagePath);
|
||||
if (packageStat && packageStat.isDirectory()) {
|
||||
checks = walk(eachPackagePath, checks);
|
||||
|
||||
console.log(
|
||||
"checks after walk: checks.isRush = " + checks.isRush +
|
||||
" , checks.isPrivate = " + checks.isPrivate +
|
||||
", checks.srcPresent = " + checks.srcPresent +
|
||||
", typedocPresent = " + checks.typedocPresent +
|
||||
", isClient = " + checks.isClient
|
||||
);
|
||||
console.log("Path: " + eachPackagePath);
|
||||
if (!checks.isPrivate) {
|
||||
if (checks.srcPresent) {
|
||||
if(checks.isClient){
|
||||
clientList.push(eachPackage);
|
||||
}
|
||||
else{
|
||||
mngmtList.push(eachPackage);
|
||||
}
|
||||
} else {
|
||||
console.log("...SKIPPING Since src folder could not be found.....");
|
||||
}
|
||||
} else {
|
||||
console.log("...SKIPPING Since package marked as private...");
|
||||
}
|
||||
}
|
||||
} //end-for each-package
|
||||
/* Adding service entry for the template index generation */
|
||||
serviceList.push({ name: eachService, mngmtList: mngmtList, clientList: clientList });
|
||||
}
|
||||
} // end-for ServiceFolders
|
||||
|
||||
// Versioned Indexes
|
||||
var yamlPath = path.join(process.cwd(), "docfx_project/api");
|
||||
var yamlFilePath = path.join(yamlPath, "toc.yml");
|
||||
|
||||
var jObject = []; //[{"name": service, "href": <link-to-md-file>}]
|
||||
var serviceMapperPath = path.join(process.cwd(),"eng/tools/generate-static-index/service-mapper.json");
|
||||
const serviceMapper = JSON.parse(fs.readFileSync(serviceMapperPath, 'utf8'));
|
||||
for (const eachService of serviceList) {
|
||||
var mdFile = eachService.name + ".md";
|
||||
jObject.push({ name: serviceMapper[eachService.name], href: mdFile });//change the value for name to lookup name for service from given json file
|
||||
var mdContent = "";
|
||||
if(eachService.clientList.length > 0){
|
||||
mdContent += "<h1>Client Libraries </h1><hr>";
|
||||
}
|
||||
|
||||
for (var package of eachService.clientList) {
|
||||
var packagename = "@azure/" + package;
|
||||
mdContent +=
|
||||
"<h3>" +
|
||||
packagename +
|
||||
"</h3>";
|
||||
}
|
||||
if (eachService.mngmtList.length > 0) {
|
||||
mdContent += "<h1>Management Libraries </h1><hr>";
|
||||
}
|
||||
|
||||
for (var package of eachService.mngmtList) {
|
||||
var packagename = "@azure/" + package;
|
||||
mdContent +=
|
||||
"<h3>" +
|
||||
packagename +
|
||||
"</h3>";
|
||||
}
|
||||
var mdFilePath = path.join(yamlPath, mdFile);
|
||||
fs.writeFile(mdFilePath, mdContent);
|
||||
}
|
||||
|
||||
fs.writeFile(yamlFilePath, jsyaml.safeDump(jObject));
|
||||
console.log("toc.yml created");
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"name": "generate-static-index",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"generate-static-index": "node index.js"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"fs-extra": "^8.1.0",
|
||||
"js-yaml": "^3.13.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
{
|
||||
"advisor": "Advisor",
|
||||
"analysisservices": "Analysis Services",
|
||||
"apimanagement": "Api Management",
|
||||
"appconfiguration": "App Configuration",
|
||||
"applicationinsights": "Application Insights",
|
||||
"appservice": "App Service",
|
||||
"authorization": "Authorization",
|
||||
"automation": "Automation",
|
||||
"azurestack": "Azure Stack",
|
||||
"batch": "Batch",
|
||||
"batchai": "Batch AI",
|
||||
"billing": "Billing",
|
||||
"botservice": "Bot Service",
|
||||
"cdn": "CDN",
|
||||
"cognitiveservices": "Cognitive Services",
|
||||
"commerce": "Commerce",
|
||||
"compute": "Compute",
|
||||
"consumption": "Consumption",
|
||||
"containerinstance": "Container Instance",
|
||||
"containerregistry": "Container Registry",
|
||||
"containerservice": "Container Service",
|
||||
"core": "Core",
|
||||
"cosmosdb": "Cosmos DB",
|
||||
"customer-insights": "Customer Insights",
|
||||
"databox": "Data Box",
|
||||
"databricks": "Databricks",
|
||||
"datacatalog": "Data Catalog",
|
||||
"datafactory": "Data Factory",
|
||||
"datamigration": "Database Migration",
|
||||
"deploymentmanager": "Deployment Manager",
|
||||
"deviceprovisioningservices": "Device Provisioning Services",
|
||||
"devspaces": "Dev Spaces",
|
||||
"devtestlabs": "DevTest Labs",
|
||||
"dns": "DNS",
|
||||
"domainservices": "Domain Services",
|
||||
"edgegateway": "Edge Gateway",
|
||||
"eventgrid": "Event Grid",
|
||||
"eventhub": "Event Hubs",
|
||||
"features": "Features",
|
||||
"frontdoor": "Front Door",
|
||||
"graphrbac": "Graph RBAC",
|
||||
"hanaonazure": "HANA on Azure",
|
||||
"hdinsight": "HDInsight",
|
||||
"identity": "Identity",
|
||||
"iotcentral": "IoT Central",
|
||||
"iothub": "IoT Hub",
|
||||
"iotspaces": "IoT Spaces",
|
||||
"keyvault": "Key Vault",
|
||||
"kusto": "Kusto",
|
||||
"labservices": "Lab Services",
|
||||
"links": "Links",
|
||||
"locks": "Locks",
|
||||
"logic": "Logic",
|
||||
"machinelearning": "Machine Learning",
|
||||
"machinelearningcompute": "Machine Learning Compute",
|
||||
"machinelearningexperimentation": "Machine Learning Experimentation",
|
||||
"machinelearningservices": "Machine Learning Services",
|
||||
"managedapplications": "Managed Applications",
|
||||
"managementgroups": "Management Groups",
|
||||
"managementpartner": "Management Partner",
|
||||
"maps": "Maps",
|
||||
"mariadb": "MariaDB",
|
||||
"marketplaceordering": "Marketplace Ordering",
|
||||
"mediaservices": "Media Services",
|
||||
"migrate": "Migrate",
|
||||
"mixedreality": "Mixed Reality",
|
||||
"monitor": "Monitor",
|
||||
"msi": "MSI",
|
||||
"mysql": "MySQL",
|
||||
"netapp": "NetApp",
|
||||
"network": "Network",
|
||||
"notificationhubs": "Notification Hubs",
|
||||
"operationalinsights": "Operational Insights",
|
||||
"operationsmanagement": "Operations Management",
|
||||
"peering": "Peering",
|
||||
"policy": "Policy",
|
||||
"policyinsights": "Policy Insights",
|
||||
"postgresql": "PostgreSQL",
|
||||
"powerbidedicated": "PowerBI Dedicated",
|
||||
"powerbiembedded": "PowerBI Embedded",
|
||||
"privatedns": "Private DNS",
|
||||
"recoveryservices": "Recovery Services",
|
||||
"recoveryservicesbackup": "Recovery Services Backup",
|
||||
"recoveryservicessiterecovery": "Recovery Services Site Recovery",
|
||||
"redis": "Redis",
|
||||
"relay": "Relay",
|
||||
"reservations": "Reservations",
|
||||
"resourcegraph": "Resource Graph",
|
||||
"resourcehealth": "Resource Health",
|
||||
"resources": "Resources",
|
||||
"search": "Search",
|
||||
"security": "Security",
|
||||
"serialconsole": "Serial Console",
|
||||
"service-map": "Service Map",
|
||||
"servicebus": "Service Bus",
|
||||
"servicefabric": "Service Fabric",
|
||||
"servicefabricmesh": "Service Fabric Mesh",
|
||||
"signalr": "SignalR",
|
||||
"sql": "SQL",
|
||||
"sqlvirtualmachine": "SQL Virtual Machine",
|
||||
"storage": "Storage",
|
||||
"storageimportexport": "Storage Import Export",
|
||||
"storagesync": "Storage Sync",
|
||||
"storsimple1200series": "Storsimple 1200 Series",
|
||||
"storsimple8000series": "Storsimple 8000 Series",
|
||||
"streamanalytics": "Stream Analytics",
|
||||
"subscription": "Subscription",
|
||||
"template": "Template",
|
||||
"test-utils": "Test Utils",
|
||||
"timeseriesinsights": "Time Series Insights",
|
||||
"trafficmanager": "Traffic Manager",
|
||||
"visualstudio": "Visual Studio",
|
||||
"vmwarecloudsimple": "VMware CloudSimple"
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" id="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="46.92px" height="46.315px" viewBox="0 0 46.92 46.315" style="enable-background:new 0 0 46.92 46.315;"
|
||||
xml:space="preserve">
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
.st0{fill:#DDDDDD;}
|
||||
]]>
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M15.297,27.558l-0.47-1.53h-2.736l-0.526,1.53H9.922l2.649-7.418h1.798l2.614,7.418H15.297z M13.453,21.807
|
||||
h-0.012l-0.948,2.948h1.889L13.453,21.807z"/>
|
||||
<path class="st0" d="M17.341,27.558v-1.116l2.804-3.229h-2.613v-1.15h4.47v1.173l-2.805,3.139h2.883v1.185L17.341,27.558
|
||||
L17.341,27.558z"/>
|
||||
<path class="st0" d="M26.249,27.558v-0.77c-0.373,0.609-0.944,0.914-1.709,0.914c-0.276,0-0.529-0.047-0.756-0.144
|
||||
c-0.226-0.097-0.424-0.233-0.585-0.415c-0.165-0.178-0.293-0.389-0.387-0.637c-0.094-0.245-0.14-0.521-0.14-0.826v-3.618h1.453
|
||||
v3.396c0,0.686,0.311,1.028,0.929,1.028c0.37,0,0.651-0.119,0.842-0.353c0.192-0.235,0.286-0.534,0.286-0.899v-3.173h1.443v5.495
|
||||
H26.249z"/>
|
||||
<path class="st0" d="M28.429,27.558v-5.495h1.363v0.658c0.12-0.186,0.243-0.332,0.373-0.435c0.131-0.105,0.264-0.186,0.403-0.241
|
||||
c0.138-0.056,0.278-0.091,0.419-0.107c0.141-0.013,0.287-0.022,0.434-0.022h0.189v1.486c-0.133-0.023-0.266-0.031-0.401-0.031
|
||||
c-0.887,0-1.33,0.441-1.33,1.328v2.859H28.429z"/>
|
||||
<path class="st0" d="M33.212,25.189c0.021,0.418,0.142,0.749,0.361,0.996c0.22,0.244,0.509,0.366,0.867,0.366
|
||||
c0.237,0,0.448-0.056,0.631-0.164c0.181-0.106,0.3-0.257,0.353-0.45h1.496c-0.172,0.565-0.467,1.001-0.895,1.307
|
||||
c-0.424,0.308-0.932,0.457-1.52,0.457c-1.831,0-2.747-0.996-2.747-2.992c0-0.424,0.058-0.81,0.178-1.151
|
||||
c0.12-0.344,0.293-0.637,0.52-0.883c0.228-0.245,0.506-0.433,0.832-0.563c0.328-0.131,0.703-0.194,1.129-0.194
|
||||
c0.85,0,1.494,0.272,1.927,0.814c0.436,0.544,0.655,1.364,0.655,2.459L33.212,25.189L33.212,25.189z M35.502,24.272
|
||||
c-0.008-0.2-0.045-0.376-0.107-0.529s-0.146-0.28-0.25-0.38c-0.104-0.102-0.225-0.175-0.36-0.225
|
||||
c-0.133-0.048-0.271-0.071-0.412-0.071c-0.291,0-0.542,0.106-0.753,0.319c-0.213,0.212-0.335,0.51-0.363,0.888h2.246V24.272z"/>
|
||||
<path class="st0" d="M17.923,30.788c-0.038-0.38-0.175-0.661-0.413-0.85c-0.239-0.188-0.596-0.28-1.073-0.28
|
||||
c-0.879,0-1.318,0.301-1.318,0.907c0,0.216,0.089,0.396,0.274,0.542c0.183,0.144,0.474,0.266,0.877,0.359
|
||||
c0.477,0.117,0.89,0.219,1.24,0.317c0.35,0.095,0.668,0.207,0.96,0.332c0.165,0.068,0.319,0.152,0.464,0.253
|
||||
c0.146,0.099,0.269,0.222,0.37,0.373c0.1,0.15,0.18,0.328,0.241,0.538c0.06,0.208,0.089,0.464,0.089,0.758
|
||||
c0,0.355-0.074,0.677-0.223,0.949c-0.15,0.277-0.352,0.508-0.603,0.699c-0.254,0.19-0.553,0.333-0.895,0.434
|
||||
c-0.342,0.101-0.704,0.152-1.083,0.152c-1.081,0-1.892-0.207-2.436-0.628c-0.545-0.418-0.832-1.032-0.861-1.854h1.497
|
||||
c0.006,0.38,0.163,0.682,0.465,0.9c0.301,0.219,0.68,0.329,1.133,0.329c0.492,0,0.866-0.089,1.117-0.269
|
||||
c0.254-0.178,0.38-0.421,0.38-0.728c0-0.119-0.015-0.228-0.044-0.326c-0.031-0.103-0.088-0.193-0.174-0.274
|
||||
c-0.087-0.084-0.203-0.155-0.352-0.22c-0.15-0.064-0.342-0.119-0.581-0.174c-0.566-0.117-1.058-0.237-1.469-0.361
|
||||
c-0.415-0.124-0.755-0.276-1.023-0.459c-0.269-0.184-0.466-0.403-0.592-0.665c-0.127-0.261-0.19-0.591-0.19-0.995
|
||||
c0-0.305,0.056-0.594,0.167-0.86c0.111-0.269,0.283-0.5,0.515-0.697c0.23-0.197,0.515-0.354,0.855-0.471
|
||||
c0.34-0.115,0.739-0.173,1.201-0.173c0.447,0,0.849,0.058,1.208,0.173c0.358,0.116,0.665,0.281,0.92,0.49
|
||||
c0.256,0.212,0.457,0.469,0.598,0.773c0.142,0.303,0.222,0.632,0.235,0.998h-1.476V30.788z"/>
|
||||
<path class="st0" d="M20.179,36.018v-7.42h2.874c0.498,0,0.961,0.084,1.387,0.254c0.422,0.164,0.787,0.404,1.087,0.717
|
||||
c0.303,0.313,0.539,0.695,0.711,1.142c0.17,0.447,0.254,0.954,0.254,1.521c0,0.565-0.075,1.08-0.228,1.549
|
||||
c-0.153,0.465-0.372,0.861-0.654,1.192c-0.281,0.331-0.623,0.59-1.014,0.775c-0.398,0.183-0.834,0.271-1.312,0.271H20.179z
|
||||
M22.974,34.756c0.677,0,1.17-0.209,1.476-0.632c0.306-0.419,0.459-1.052,0.459-1.894c0-0.42-0.039-0.776-0.113-1.073
|
||||
c-0.074-0.298-0.194-0.542-0.361-0.733c-0.167-0.19-0.383-0.327-0.643-0.415c-0.261-0.085-0.579-0.128-0.949-0.128H21.69v4.872
|
||||
h1.283V34.756z"/>
|
||||
<path class="st0" d="M31.689,36.018l-2.202-3.342l-0.823,0.817v2.524h-1.53v-7.42h1.53v3.018l2.838-3.018h2.01l-2.925,2.927
|
||||
l2.991,4.492L31.689,36.018L31.689,36.018z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M14.765,39.33c-2.16,0-3.927-0.006-5.563-0.016c-2.536-0.016-4.625-1.017-6.209-2.979
|
||||
c-1.229-1.524-1.793-3.27-1.678-5.191c0.176-2.971,1.701-5.256,4.41-6.608c0.397-0.199,0.433-0.294,0.44-0.688
|
||||
c0.028-1.434,0.518-2.787,1.452-4.025c1.007-1.33,2.369-2.237,4.05-2.699c0.903-0.25,1.907-0.292,2.953-0.128
|
||||
c0.584,0.089,1.137,0.287,1.668,0.476c0.066,0.022,0.13,0.045,0.195,0.068c0.517-1.254,1.284-2.365,2.293-3.313
|
||||
c1.06-1,2.309-1.791,3.708-2.346c1.645-0.653,3.423-0.951,5.268-0.884c3.103,0.11,5.763,1.16,7.917,3.121
|
||||
c1.729,1.579,2.735,3.528,2.992,5.793c0.004,0.038,0.012,0.074,0.017,0.108c0.02,0.095,0.042,0.211,0.042,0.343l-0.002,0.104
|
||||
c0,0.004,0,0.009,0,0.01c0.057,0.019,0.121,0.038,0.198,0.063c1.579,0.522,2.956,1.4,4.094,2.609
|
||||
c1.193,1.264,1.985,2.746,2.359,4.407c0.35,1.553,0.333,3.063-0.051,4.49c-0.707,2.635-2.27,4.654-4.643,6.007
|
||||
c-1.473,0.837-3.111,1.264-4.876,1.269c-1.92,0-3.837,0-5.754,0h-7.479c-1.3,0-2.603,0-3.901,0
|
||||
C17.368,39.327,16.067,39.33,14.765,39.33z M13.397,17.959c-0.509,0-0.995,0.062-1.446,0.187c-1.452,0.401-2.624,1.18-3.483,2.318
|
||||
c-0.799,1.055-1.214,2.199-1.238,3.403c-0.016,0.815-0.296,1.253-1.029,1.62c-2.384,1.192-3.671,3.118-3.826,5.72
|
||||
c-0.099,1.649,0.389,3.152,1.446,4.462c1.375,1.702,3.188,2.574,5.389,2.587c1.632,0.008,3.398,0.01,5.556,0.01
|
||||
c1.302,0,2.602,0,3.902-0.002c1.301,0,2.603-0.003,3.904-0.003h7.478c1.917,0,3.834,0,5.752,0c1.577,0,3.042-0.381,4.352-1.131
|
||||
c2.119-1.203,3.51-3.007,4.143-5.356c0.337-1.258,0.353-2.6,0.043-3.98c-0.332-1.476-1.039-2.789-2.095-3.913
|
||||
c-1.017-1.078-2.248-1.862-3.659-2.329c-0.078-0.025-0.146-0.046-0.203-0.064c-0.622-0.19-0.729-0.436-0.723-1.031l0.002-0.102
|
||||
c0-0.024-0.009-0.082-0.021-0.133c-0.012-0.063-0.022-0.125-0.03-0.187c-0.229-2.004-1.118-3.729-2.651-5.131
|
||||
c-1.959-1.788-4.397-2.743-7.237-2.845c-1.7-0.058-3.333,0.213-4.84,0.811c-1.273,0.504-2.408,1.223-3.371,2.131
|
||||
c-0.954,0.897-1.667,1.955-2.117,3.143c-0.18,0.469-0.519,0.537-0.706,0.537c-0.104,0-0.21-0.019-0.335-0.062
|
||||
c-0.137-0.047-0.274-0.096-0.413-0.143c-0.511-0.183-0.993-0.354-1.479-0.429C14.095,17.987,13.739,17.959,13.397,17.959z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 6.5 KiB |
|
@ -0,0 +1,996 @@
|
|||
/* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information. */
|
||||
html,
|
||||
body {
|
||||
font-family: "Segoe UI", sans-serif;
|
||||
height: 100%;
|
||||
}
|
||||
button,
|
||||
a {
|
||||
color: #337ab7;
|
||||
cursor: pointer;
|
||||
}
|
||||
button:hover,
|
||||
button:focus,
|
||||
a:hover,
|
||||
a:focus {
|
||||
color: #23527c;
|
||||
text-decoration: none;
|
||||
}
|
||||
a.disable,
|
||||
a.disable:hover {
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.text-break {
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
h1 mark,
|
||||
h2 mark,
|
||||
h3 mark,
|
||||
h4 mark,
|
||||
h5 mark,
|
||||
h6 mark {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.inheritance .level0:before,
|
||||
.inheritance .level1:before,
|
||||
.inheritance .level2:before,
|
||||
.inheritance .level3:before,
|
||||
.inheritance .level4:before,
|
||||
.inheritance .level5:before {
|
||||
content: "↳";
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.inheritance .level0 {
|
||||
margin-left: 0em;
|
||||
}
|
||||
|
||||
.inheritance .level1 {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.inheritance .level2 {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.inheritance .level3 {
|
||||
margin-left: 3em;
|
||||
}
|
||||
|
||||
.inheritance .level4 {
|
||||
margin-left: 4em;
|
||||
}
|
||||
|
||||
.inheritance .level5 {
|
||||
margin-left: 5em;
|
||||
}
|
||||
|
||||
span.parametername,
|
||||
span.paramref,
|
||||
span.typeparamref {
|
||||
font-style: italic;
|
||||
}
|
||||
span.languagekeyword {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
svg:hover path {
|
||||
fill: #ffffff;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: inline;
|
||||
background-color: inherit;
|
||||
padding: 0;
|
||||
}
|
||||
/* additional spacing fixes */
|
||||
.btn + .btn {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.btn.pull-right {
|
||||
margin-left: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.table {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
table p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
table a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Make hidden attribute compatible with old browser.*/
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
h1,
|
||||
.h1,
|
||||
h2,
|
||||
.h2,
|
||||
h3,
|
||||
.h3 {
|
||||
margin-top: 15px;
|
||||
margin-bottom: 10px;
|
||||
font-weight: 400;
|
||||
}
|
||||
h4,
|
||||
.h4,
|
||||
h5,
|
||||
.h5,
|
||||
h6,
|
||||
.h6 {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.navbar {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#wrapper {
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
/* blends header footer and content together with gradient effect */
|
||||
.grad-top {
|
||||
/* For Safari 5.1 to 6.0 */
|
||||
/* For Opera 11.1 to 12.0 */
|
||||
/* For Firefox 3.6 to 15 */
|
||||
background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0));
|
||||
/* Standard syntax */
|
||||
height: 5px;
|
||||
}
|
||||
.grad-bottom {
|
||||
/* For Safari 5.1 to 6.0 */
|
||||
/* For Opera 11.1 to 12.0 */
|
||||
/* For Firefox 3.6 to 15 */
|
||||
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05));
|
||||
/* Standard syntax */
|
||||
height: 5px;
|
||||
}
|
||||
.divider {
|
||||
margin: 0 5px;
|
||||
color: #cccccc;
|
||||
}
|
||||
hr {
|
||||
border-color: #cccccc;
|
||||
}
|
||||
header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
header .navbar {
|
||||
border-width: 0 0 1px;
|
||||
border-radius: 0;
|
||||
}
|
||||
.navbar-brand {
|
||||
font-size: inherit;
|
||||
padding: 0;
|
||||
}
|
||||
.navbar-collapse {
|
||||
margin: 0 -15px;
|
||||
}
|
||||
.subnav {
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.inheritance h5,
|
||||
.inheritedMembers h5 {
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
article h1,
|
||||
article h2,
|
||||
article h3,
|
||||
article h4 {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
article h4 {
|
||||
border-bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
article span.small.pull-right {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
article section {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
/*.expand-all {
|
||||
padding: 10px 0;
|
||||
}*/
|
||||
.breadcrumb {
|
||||
margin: 0;
|
||||
padding: 10 0px;
|
||||
background-color: inherit;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.breadcrumb > li + li:before {
|
||||
content: "\00a0/";
|
||||
}
|
||||
#autocollapse.collapsed .navbar-header {
|
||||
float: none;
|
||||
}
|
||||
#autocollapse.collapsed .navbar-toggle {
|
||||
display: block;
|
||||
}
|
||||
#autocollapse.collapsed .navbar-collapse {
|
||||
border-top: 1px solid transparent;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
#autocollapse.collapsed .navbar-collapse.collapse {
|
||||
display: none !important;
|
||||
}
|
||||
#autocollapse.collapsed .navbar-nav {
|
||||
float: none !important;
|
||||
margin: 7.5px -15px;
|
||||
}
|
||||
#autocollapse.collapsed .navbar-nav > li {
|
||||
float: none;
|
||||
}
|
||||
#autocollapse.collapsed .navbar-nav > li > a {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
#autocollapse.collapsed .collapse.in,
|
||||
#autocollapse.collapsed .collapsing {
|
||||
display: block !important;
|
||||
}
|
||||
#autocollapse.collapsed .collapse.in .navbar-right,
|
||||
#autocollapse.collapsed .collapsing .navbar-right {
|
||||
float: none !important;
|
||||
}
|
||||
#autocollapse .form-group {
|
||||
width: 100%;
|
||||
}
|
||||
#autocollapse .form-control {
|
||||
width: 100%;
|
||||
}
|
||||
#autocollapse .navbar-header {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
#autocollapse .navbar-brand {
|
||||
margin-left: 0;
|
||||
}
|
||||
.collapse.in,
|
||||
.collapsing {
|
||||
text-align: center;
|
||||
}
|
||||
.collapsing .navbar-form {
|
||||
margin: 0 auto;
|
||||
max-width: 400px;
|
||||
padding: 10px 15px;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1),
|
||||
0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.collapsed .collapse.in .navbar-form {
|
||||
margin: 0 auto;
|
||||
max-width: 400px;
|
||||
padding: 10px 15px;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1),
|
||||
0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.navbar .navbar-nav {
|
||||
display: inline-block;
|
||||
}
|
||||
.docs-search {
|
||||
background: white;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.docs-search > .search-query {
|
||||
font-size: 14px;
|
||||
border: 0;
|
||||
width: 120%;
|
||||
color: #555;
|
||||
}
|
||||
.docs-search > .search-query:focus {
|
||||
outline: 0;
|
||||
}
|
||||
.search-results-frame {
|
||||
clear: both;
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
.search-results.ng-hide {
|
||||
display: none;
|
||||
}
|
||||
.search-results-container {
|
||||
padding-bottom: 1em;
|
||||
border-top: 1px solid #111;
|
||||
background: rgba(25, 25, 25, 0.5);
|
||||
}
|
||||
.search-results-container .search-results-group {
|
||||
padding-top: 50px !important;
|
||||
padding: 10px;
|
||||
}
|
||||
.search-results-group-heading {
|
||||
font-family: "Open Sans";
|
||||
padding-left: 10px;
|
||||
color: white;
|
||||
}
|
||||
.search-close {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -100px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
background: #333;
|
||||
border-top-right-radius: 5px;
|
||||
border-top-left-radius: 5px;
|
||||
width: 200px;
|
||||
box-shadow: 0 0 10px #111;
|
||||
}
|
||||
#search {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Search results display*/
|
||||
#search-results {
|
||||
max-width: 960px !important;
|
||||
margin-top: 120px;
|
||||
margin-bottom: 115px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
line-height: 1.8;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#search-results > .search-list {
|
||||
text-align: center;
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
#search-results p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#search-results p .index-loading {
|
||||
animation: index-loading 1.5s infinite linear;
|
||||
-webkit-animation: index-loading 1.5s infinite linear;
|
||||
-o-animation: index-loading 1.5s infinite linear;
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
|
||||
@keyframes index-loading {
|
||||
from {
|
||||
transform: scale(1) rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: scale(1) rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes index-loading {
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@-o-keyframes index-loading {
|
||||
from {
|
||||
-o-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-o-transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#search-results .sr-items {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.sr-item {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.sr-item > .item-href {
|
||||
font-size: 14px;
|
||||
color: #093;
|
||||
}
|
||||
|
||||
.sr-item > .item-brief {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.pagination > li > a {
|
||||
color: #47a7a0;
|
||||
}
|
||||
|
||||
.pagination > .active > a {
|
||||
background-color: #47a7a0;
|
||||
border-color: #47a7a0;
|
||||
}
|
||||
|
||||
.fixed_header {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
margin: 0px;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.fixed_header + .toc {
|
||||
margin-top: 50px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.sidetoc {
|
||||
position: fixed;
|
||||
width: 260px;
|
||||
top: 150px;
|
||||
bottom: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
border-left: 1px solid #e7e7e7;
|
||||
border-right: 1px solid #e7e7e7;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.sidetoc.shiftup {
|
||||
bottom: 70px;
|
||||
}
|
||||
|
||||
body .toc {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.sidetoggle.ng-hide {
|
||||
display: block !important;
|
||||
}
|
||||
.sidetoc-expand > .caret {
|
||||
margin-left: 0px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
.sidetoc-expand > .caret-side {
|
||||
border-left: 4px solid;
|
||||
border-top: 4px solid transparent;
|
||||
border-bottom: 4px solid transparent;
|
||||
margin-left: 4px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
.sidetoc-heading {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.toc {
|
||||
margin: 0px 0 0 10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.expand-stub {
|
||||
position: absolute;
|
||||
left: -10px;
|
||||
}
|
||||
.toc .nav > li > a.sidetoc-expand {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.toc .nav > li > a {
|
||||
color: #666666;
|
||||
margin-left: 5px;
|
||||
display: block;
|
||||
padding: 0;
|
||||
}
|
||||
.toc .nav > li > a:hover,
|
||||
.toc .nav > li > a:focus {
|
||||
color: #000000;
|
||||
background: none;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
.toc .nav > li.active > a {
|
||||
color: #337ab7;
|
||||
font-family: "Segoe UI", sans-serif;
|
||||
}
|
||||
.toc .nav > li.active > a:hover,
|
||||
.toc .nav > li.active > a:focus {
|
||||
color: #23527c;
|
||||
}
|
||||
|
||||
.toc .nav > li > .expand-stub {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.toc .nav > li.active > .expand-stub::before,
|
||||
.toc .nav > li.in > .expand-stub::before,
|
||||
.toc .nav > li.in.active > .expand-stub::before,
|
||||
.toc .nav > li.filtered > .expand-stub::before {
|
||||
content: "-";
|
||||
}
|
||||
|
||||
.toc .nav > li > .expand-stub::before,
|
||||
.toc .nav > li.active > .expand-stub::before {
|
||||
content: "+";
|
||||
}
|
||||
|
||||
.toc .nav > li.filtered > ul,
|
||||
.toc .nav > li.in > ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.toc .nav > li > ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toc ul {
|
||||
font-size: 12px;
|
||||
margin: 0 0 0 3px;
|
||||
}
|
||||
|
||||
.toc .level1 > li {
|
||||
font-weight: normal;
|
||||
margin-top: 10px;
|
||||
position: relative;
|
||||
font-size: 16px;
|
||||
}
|
||||
.toc .level2 {
|
||||
font-weight: normal;
|
||||
margin: 5px 0 0 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.toc-toggle {
|
||||
display: none;
|
||||
margin: 0 15px 0px 15px;
|
||||
}
|
||||
.sidefilter {
|
||||
position: fixed;
|
||||
top: 90px;
|
||||
width: 260px;
|
||||
background-color: #f1f1f1;
|
||||
padding: 15px;
|
||||
border-left: 1px solid #e7e7e7;
|
||||
border-right: 1px solid #e7e7e7;
|
||||
z-index: 1;
|
||||
}
|
||||
.toc-filter {
|
||||
border-radius: 5px;
|
||||
background: #fff;
|
||||
color: #666666;
|
||||
padding: 5px;
|
||||
position: relative;
|
||||
margin: 0 5px 0 5px;
|
||||
}
|
||||
.toc-filter > input {
|
||||
border: 0;
|
||||
color: #666666;
|
||||
padding-left: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
.toc-filter > input:focus {
|
||||
outline: 0;
|
||||
}
|
||||
.toc-filter > .filter-icon {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 5px;
|
||||
}
|
||||
.article {
|
||||
margin-top: 120px;
|
||||
margin-bottom: 115px;
|
||||
}
|
||||
|
||||
#_content > a {
|
||||
margin-top: 105px;
|
||||
}
|
||||
|
||||
.article.grid-right {
|
||||
margin-left: 280px;
|
||||
}
|
||||
|
||||
.inheritance hr {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.article img {
|
||||
max-width: 100%;
|
||||
}
|
||||
.sideaffix {
|
||||
margin-top: 50px;
|
||||
font-size: 12px;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
top: 100px;
|
||||
bottom: 10px;
|
||||
position: fixed;
|
||||
}
|
||||
.sideaffix.shiftup {
|
||||
bottom: 70px;
|
||||
}
|
||||
.affix {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
.sideaffix > div.contribution {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.sideaffix > div.contribution > ul > li > a.contribution-link {
|
||||
padding: 6px 10px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
}
|
||||
.sideaffix > div.contribution > ul > li > a.contribution-link:hover {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.sideaffix ul.nav > li > a:focus {
|
||||
background: none;
|
||||
}
|
||||
.affix h5 {
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
padding-left: 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.affix > ul.level1 {
|
||||
overflow: hidden;
|
||||
padding-bottom: 10px;
|
||||
height: calc(100% - 100px);
|
||||
}
|
||||
.affix ul > li > a:before {
|
||||
color: #cccccc;
|
||||
position: absolute;
|
||||
}
|
||||
.affix ul > li > a:hover {
|
||||
background: none;
|
||||
color: #666666;
|
||||
}
|
||||
.affix ul > li.active > a,
|
||||
.affix ul > li.active > a:before {
|
||||
color: #337ab7;
|
||||
font-family: "Segoe UI", sans-serif;
|
||||
}
|
||||
.affix ul > li > a {
|
||||
padding: 5px 12px;
|
||||
color: #666666;
|
||||
}
|
||||
.affix > ul > li.active:last-child {
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.affix > ul > li > a:before {
|
||||
content: "|";
|
||||
font-size: 16px;
|
||||
top: 1px;
|
||||
left: 0;
|
||||
}
|
||||
.affix > ul > li.active > a,
|
||||
.affix > ul > li.active > a:before {
|
||||
color: #337ab7;
|
||||
font-weight: bold;
|
||||
font-family: "Segoe UI", sans-serif;
|
||||
}
|
||||
.affix ul ul > li > a {
|
||||
padding: 2px 15px;
|
||||
}
|
||||
.affix ul ul > li > a:before {
|
||||
content: ">";
|
||||
font-size: 14px;
|
||||
top: -1px;
|
||||
left: 5px;
|
||||
}
|
||||
.affix ul > li > a:before,
|
||||
.affix ul ul {
|
||||
display: none;
|
||||
}
|
||||
.affix ul > li.active > ul,
|
||||
.affix ul > li.active > a:before,
|
||||
.affix ul > li > a:hover:before {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.codewrapper {
|
||||
position: relative;
|
||||
}
|
||||
.trydiv {
|
||||
height: 0px;
|
||||
}
|
||||
.tryspan {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
border-style: solid;
|
||||
border-radius: 0px 4px;
|
||||
box-sizing: border-box;
|
||||
border-width: 1px;
|
||||
border-color: #cccccc;
|
||||
text-align: center;
|
||||
padding: 2px 8px;
|
||||
background-color: white;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
z-index: 100;
|
||||
display: none;
|
||||
color: #767676;
|
||||
}
|
||||
.tryspan:hover {
|
||||
background-color: #3b8bd0;
|
||||
color: white;
|
||||
border-color: #3b8bd0;
|
||||
}
|
||||
.codewrapper:hover .tryspan {
|
||||
display: block;
|
||||
}
|
||||
.sample-response .response-content {
|
||||
max-height: 200px;
|
||||
}
|
||||
footer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
.footer {
|
||||
border-top: 1px solid #e7e7e7;
|
||||
background-color: #f8f8f8;
|
||||
padding: 15px 0;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
#sidetoggle.collapse {
|
||||
display: block;
|
||||
}
|
||||
.topnav .navbar-nav {
|
||||
float: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.topnav .navbar-nav > li {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 768px) {
|
||||
#mobile-indicator {
|
||||
display: block;
|
||||
}
|
||||
/* TOC display for responsive */
|
||||
.article {
|
||||
margin-top: 30px !important;
|
||||
}
|
||||
header {
|
||||
position: static;
|
||||
}
|
||||
.topnav {
|
||||
text-align: center;
|
||||
}
|
||||
.sidenav {
|
||||
padding: 15px 0;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
.sidefilter {
|
||||
position: static;
|
||||
width: auto;
|
||||
float: none;
|
||||
border: none;
|
||||
}
|
||||
.sidetoc {
|
||||
position: static;
|
||||
width: auto;
|
||||
float: none;
|
||||
padding-bottom: 0px;
|
||||
border: none;
|
||||
}
|
||||
.toc .nav > li,
|
||||
.toc .nav > li > a {
|
||||
display: inline-block;
|
||||
}
|
||||
.toc li:after {
|
||||
margin-left: -3px;
|
||||
margin-right: 5px;
|
||||
content: ", ";
|
||||
color: #666666;
|
||||
}
|
||||
.toc .level1 > li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.toc .level1 > li:after {
|
||||
display: none;
|
||||
}
|
||||
.article.grid-right {
|
||||
margin-left: 0;
|
||||
}
|
||||
.grad-top,
|
||||
.grad-bottom {
|
||||
display: none;
|
||||
}
|
||||
.toc-toggle {
|
||||
display: block;
|
||||
}
|
||||
.sidetoggle.ng-hide {
|
||||
display: none !important;
|
||||
}
|
||||
/*.expand-all {
|
||||
display: none;
|
||||
}*/
|
||||
.sideaffix {
|
||||
display: none;
|
||||
}
|
||||
.mobile-hide {
|
||||
display: none;
|
||||
}
|
||||
.breadcrumb {
|
||||
white-space: inherit;
|
||||
}
|
||||
|
||||
/* workaround for #hashtag url is no longer needed*/
|
||||
h1:before,
|
||||
h2:before,
|
||||
h3:before,
|
||||
h4:before {
|
||||
content: "";
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* For toc iframe */
|
||||
@media (max-width: 260px) {
|
||||
.toc .level2 > li {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.toc .level2 > li:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* For code snippet line highlight */
|
||||
pre > code .line-highlight {
|
||||
background-color: #ffffcc;
|
||||
}
|
||||
|
||||
/* Alerts */
|
||||
.alert h5 {
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.alert h5:before {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
display: inline-block;
|
||||
font-family: "Glyphicons Halflings";
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
margin-right: 5px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.alert-info h5:before {
|
||||
content: "\e086";
|
||||
}
|
||||
|
||||
.alert-warning h5:before {
|
||||
content: "\e127";
|
||||
}
|
||||
|
||||
.alert-danger h5:before {
|
||||
content: "\e107";
|
||||
}
|
||||
|
||||
/* For Embedded Video */
|
||||
div.embeddedvideo {
|
||||
padding-top: 56.25%;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.embeddedvideo iframe {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* For printer */
|
||||
@media print {
|
||||
.article.grid-right {
|
||||
margin-top: 0px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
.sideaffix {
|
||||
display: none;
|
||||
}
|
||||
.mobile-hide {
|
||||
display: none;
|
||||
}
|
||||
.footer {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* For tabbed content */
|
||||
|
||||
.tabGroup {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
.tabGroup ul[role="tablist"] {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.tabGroup ul[role="tablist"] > li {
|
||||
list-style: none;
|
||||
display: inline-block;
|
||||
}
|
||||
.tabGroup a[role="tab"] {
|
||||
color: #6e6e6e;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
padding: 5px 7.5px;
|
||||
text-decoration: none;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
.tabGroup a[role="tab"]:hover,
|
||||
.tabGroup a[role="tab"]:focus,
|
||||
.tabGroup a[role="tab"][aria-selected="true"] {
|
||||
border-bottom: 2px solid #0050c5;
|
||||
}
|
||||
.tabGroup a[role="tab"][aria-selected="true"] {
|
||||
color: #222;
|
||||
}
|
||||
.tabGroup a[role="tab"]:hover,
|
||||
.tabGroup a[role="tab"]:focus {
|
||||
color: #0050c5;
|
||||
}
|
||||
.tabGroup a[role="tab"]:focus {
|
||||
outline: 1px solid #0050c5;
|
||||
outline-offset: -1px;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.tabGroup a[role="tab"] {
|
||||
padding: 5px 15px;
|
||||
}
|
||||
}
|
||||
.tabGroup section[role="tabpanel"] {
|
||||
border: 1px solid #e0e0e0;
|
||||
padding: 15px;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.tabGroup section[role="tabpanel"] > .codeHeader,
|
||||
.tabGroup section[role="tabpanel"] > pre {
|
||||
margin-left: -16px;
|
||||
margin-right: -16px;
|
||||
}
|
||||
.tabGroup section[role="tabpanel"] > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
.tabGroup section[role="tabpanel"] > pre:last-child {
|
||||
display: block;
|
||||
margin-bottom: -16px;
|
||||
}
|
||||
|
||||
.mainContainer[dir="rtl"] main ul[role="tablist"] {
|
||||
margin: 0;
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"metadata": [
|
||||
{
|
||||
"src": [
|
||||
{
|
||||
"files": ["src/**.csproj"]
|
||||
}
|
||||
],
|
||||
"dest": "api",
|
||||
"disableGitFeatures": false,
|
||||
"disableDefaultFilter": false
|
||||
}
|
||||
],
|
||||
"build": {
|
||||
"content": [
|
||||
{
|
||||
"files": ["api/**.yml", "api/**.md", "api/index.md"]
|
||||
},
|
||||
{
|
||||
"files": ["toc.yml", "*.md"]
|
||||
}
|
||||
],
|
||||
"resource": [
|
||||
{
|
||||
"files": ["images/**"]
|
||||
}
|
||||
],
|
||||
"overwrite": [
|
||||
{
|
||||
"files": ["apidoc/**.md"],
|
||||
"exclude": ["obj/**", "_site/**"]
|
||||
}
|
||||
],
|
||||
"dest": "_site",
|
||||
"globalMetadataFiles": [],
|
||||
"fileMetadataFiles": [],
|
||||
"postProcessors": [],
|
||||
"markdownEngineName": "markdig",
|
||||
"noLangKeyword": false,
|
||||
"keepFileLink": false,
|
||||
"cleanupCacheHistory": false,
|
||||
"disableGitFeatures": false,
|
||||
"globalMetadata": {
|
||||
"_appTitle": "Azure SDK for JS",
|
||||
"_appFooter": "Azure SDK for JS",
|
||||
"_disableContribution": true,
|
||||
"_enableSearch": false,
|
||||
"_enableNewTab": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
var WINDOW_CONTENTS = window.location.href.split("/");
|
||||
var SELECTED_LANGUAGE = "javascript";
|
||||
|
||||
function httpGetAsync(targetUrl, callback) {
|
||||
var xmlHttp = new XMLHttpRequest();
|
||||
xmlHttp.onreadystatechange = function() {
|
||||
if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
|
||||
callback(xmlHttp.responseText);
|
||||
};
|
||||
xmlHttp.open("GET", targetUrl, true); // true for asynchronous
|
||||
xmlHttp.send(null);
|
||||
}
|
||||
function populateIndexList(selector, packageName) {
|
||||
url =
|
||||
"https://azuresdkdocsdev.blob.core.windows.net/$web?restype=container&comp=list&prefix=" +
|
||||
SELECTED_LANGUAGE +
|
||||
"/" +
|
||||
packageName +
|
||||
"/versions/";
|
||||
console.log(url);
|
||||
console.log(selector);
|
||||
httpGetAsync(url, function(responseText) {
|
||||
var publishedversions = document.createElement("ul");
|
||||
if (responseText) {
|
||||
parser = new DOMParser();
|
||||
xmlDoc = parser.parseFromString(responseText, "text/xml");
|
||||
nameElements = Array.from(xmlDoc.getElementsByTagName("Name"));
|
||||
options = [];
|
||||
for (var i in nameElements) {
|
||||
options.push(nameElements[i].textContent.split("/")[3]);
|
||||
}
|
||||
for (var i in options) {
|
||||
$(publishedversions).append(
|
||||
'<li><a href="' +
|
||||
getPackageUrl(SELECTED_LANGUAGE, packageName, options[i]) +
|
||||
'" target="_blank">' +
|
||||
options[i] +
|
||||
"</a></li>"
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$(publishedversions).append(
|
||||
"<li>No discovered versions present in blob storage.</li>"
|
||||
);
|
||||
}
|
||||
$(selector).after(publishedversions);
|
||||
});
|
||||
}
|
||||
function getPackageUrl(language, package, version) {
|
||||
return (
|
||||
"https://azuresdkdocsdev.blob.core.windows.net/$web/" +
|
||||
language +
|
||||
"/" +
|
||||
package +
|
||||
"/" +
|
||||
version +
|
||||
"/index.html"
|
||||
);
|
||||
}
|
||||
// Populate Index
|
||||
$(function() {
|
||||
$("h3").each(function() {
|
||||
var pkgName = $(this)
|
||||
.text()
|
||||
.replace("@azure/", "azure-");
|
||||
console.log(pkgName);
|
||||
populateIndexList($(this), pkgName);
|
||||
});
|
||||
});
|
|
@ -0,0 +1,55 @@
|
|||
param (
|
||||
$BinariesDir,
|
||||
$PipelineWorkspace,
|
||||
$SASKey
|
||||
)
|
||||
|
||||
function Upload-Blobs
|
||||
{
|
||||
Param (
|
||||
[Parameter(Mandatory=$true)] [String]$DocDir,
|
||||
[Parameter(Mandatory=$true)] [String]$PkgName,
|
||||
[Parameter(Mandatory=$true)] [String]$DocVersion,
|
||||
[Parameter(Mandatory=$true)] [String]$Language
|
||||
)
|
||||
|
||||
$AzCopy = "$($BinariesDir)/AzCopy/azcopy_windows_amd64_10.3.0/azcopy.exe"
|
||||
$DocDest = "https://azuresdkdocsdev.blob.core.windows.net/`$web/$($Language)"
|
||||
|
||||
New-Item "$($BinariesDir)/versionplaceholder.txt" -Force
|
||||
Write-Host "DocDest $($DocDest)"
|
||||
Write-Host "PkgName $($PkgName)"
|
||||
Write-Host "DocVersion $($DocVersion)"
|
||||
Write-Host "DocDir $($DocDir)"
|
||||
Write-Host "Final Dest $($DocDest)/$($PkgName)/$($DocVersion)"
|
||||
Write-Host "Uploading $($PkgName)/$($DocVersion) to $($DocDest)..."
|
||||
& $($AzCopy) cp "$($DocDir)/**" "$($DocDest)/$($PkgName)/$($DocVersion)/$($SASKey)" --recursive=true
|
||||
|
||||
Write-Host "Uploading versionplaceholder $($DocDest)/$($PkgName)/versions/$($DocVersion)"
|
||||
& $($AzCopy) cp "$($BinariesDir)/versionplaceholder.txt" "$($DocDest)/$($PkgName)/versions/$($DocVersion)$($SASKey)" --recursive=true
|
||||
}
|
||||
|
||||
function Process-DocJS
|
||||
{
|
||||
Write-Host "In function Process-DocJS $($PipelineWorkspace)"
|
||||
|
||||
#$PublishedPkgs = Get-ChildItem "$($PipelineWorkspace)/packages" | Where-Object -FilterScript {$_.Name.EndsWith(".tgz")}
|
||||
$PublishedDocs = Get-ChildItem "$($PipelineWorkspace)/documentation" | Where-Object -FilterScript {$_.Name.EndsWith(".zip")}
|
||||
|
||||
foreach ($Item in $PublishedDocs) {
|
||||
$PkgName = "azure-$($Item.BaseName)"
|
||||
Write-Host $PkgName
|
||||
Expand-Archive -Path "$($PipelineWorkspace)/documentation/$($Item.Name)" -DestinationPath "$($PipelineWorkspace)/documentation/$($Item.BaseName)"
|
||||
$dirList = Get-ChildItem "$($PipelineWorkspace)/documentation/$($Item.BaseName)/$($Item.BaseName)" -Attributes Directory
|
||||
if($dirList.Length -eq 1){
|
||||
$DocVersion = $dirList[0].Name
|
||||
Write-Host "Uploading Doc for $($PkgName) Version:- $($DocVersion)..."
|
||||
Upload-Blobs -DocDir "$($PipelineWorkspace)/documentation/$($Item.BaseName)/$($Item.BaseName)/$($DocVersion)" -PkgName $PkgName -DocVersion $DocVersion -Language "javascript"
|
||||
}
|
||||
else{
|
||||
Write-Host "found more than 1 folder under the documentation for package - $($Item.Name)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Process-DocJS
|
|
@ -59,5 +59,8 @@
|
|||
},
|
||||
"engines": {
|
||||
"node": ">=10.10.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"generate-static-index": "file:eng/tools/generate-static-index"
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче