diff --git a/package.json b/package.json index e6f18f64a6..7e60fa0a53 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "Alfresco Software, Ltd.", "main": "./index.js", "scripts": { - "docindex": "node ./lib/config/DocProcessor/docProcessor.js ../docs", + "docbuild": "node ./tools/doc/docProcessor.js", "prepublishOnly": "npm run build-lib", "markdownlint": "markdownlint ./docs", "build-lib": "./scripts/ng-packagr.sh", diff --git a/lib/config/DocProcessor/ReviewCheckerGuide.md b/tools/doc/ReviewCheckerGuide.md similarity index 100% rename from lib/config/DocProcessor/ReviewCheckerGuide.md rename to tools/doc/ReviewCheckerGuide.md diff --git a/lib/config/DocProcessor/commitStoplist.json b/tools/doc/commitStoplist.json similarity index 100% rename from lib/config/DocProcessor/commitStoplist.json rename to tools/doc/commitStoplist.json diff --git a/lib/config/DocProcessor/docProcessor.js b/tools/doc/docProcessor.js similarity index 97% rename from lib/config/DocProcessor/docProcessor.js rename to tools/doc/docProcessor.js index 1e463f9d06..02a78695aa 100644 --- a/lib/config/DocProcessor/docProcessor.js +++ b/tools/doc/docProcessor.js @@ -13,7 +13,7 @@ var aggData = {}; var toolsFolderName = "tools"; var configFileName = "doctool.config.json"; -var defaultFolder = path.resolve("..", "docs"); +var defaultFolder = path.resolve("docs"); function initPhase(aggData) { @@ -127,13 +127,13 @@ function getAllDocFilePaths(docFolder, files) { program .usage("[options] ") -.option("-p, --profile [profileName]", "Select named config profile", "index") +.option("-p, --profile [profileName]", "Select named config profile", "default") .parse(process.argv); var sourcePath; if (program.args.length === 0) { - sourcePath = path.resolve("..", "docs"); + sourcePath = defaultFolder; } else { sourcePath = path.resolve(program.args[0]); } diff --git a/lib/config/DocProcessor/doctool.config.json b/tools/doc/doctool.config.json similarity index 65% rename from lib/config/DocProcessor/doctool.config.json rename to tools/doc/doctool.config.json index 78c4e89ef8..10a5f713c7 100644 --- a/lib/config/DocProcessor/doctool.config.json +++ b/tools/doc/doctool.config.json @@ -1,5 +1,12 @@ { "profiles": { + "default": [ + "index", + "versionIndex", + "tutorialIndex", + "tsInfo", + "toc" + ], "index": [ "index", "versionIndex", diff --git a/lib/config/DocProcessor/libsearch.js b/tools/doc/libsearch.js similarity index 100% rename from lib/config/DocProcessor/libsearch.js rename to tools/doc/libsearch.js diff --git a/lib/config/DocProcessor/ngHelpers.js b/tools/doc/ngHelpers.js similarity index 100% rename from lib/config/DocProcessor/ngHelpers.js rename to tools/doc/ngHelpers.js diff --git a/lib/config/DocProcessor/reviewChecker.js b/tools/doc/reviewChecker.js similarity index 97% rename from lib/config/DocProcessor/reviewChecker.js rename to tools/doc/reviewChecker.js index e129689a19..cd702880cb 100644 --- a/lib/config/DocProcessor/reviewChecker.js +++ b/tools/doc/reviewChecker.js @@ -15,7 +15,7 @@ var adf20StartDate = "2017-11-20"; var commitWeight = 0.1; var scoreTimeBase = 60; var rootFolder = "."; -var stoplistFilePath = path.resolve("config", "DocProcessor", "commitStoplist.json"); +var stoplistFilePath = path.resolve("..", "tools", "doc", "commitStoplist.json"); var angFilePattern = /(component)|(directive)|(model)|(pipe)|(service)|(widget)/; var srcData = {}; var stoplist = new stoplist_1.Stoplist(stoplistFilePath); diff --git a/lib/config/DocProcessor/reviewChecker.ts b/tools/doc/reviewChecker.ts similarity index 97% rename from lib/config/DocProcessor/reviewChecker.ts rename to tools/doc/reviewChecker.ts index cc0de7499a..8d3cf75dd6 100644 --- a/lib/config/DocProcessor/reviewChecker.ts +++ b/tools/doc/reviewChecker.ts @@ -20,7 +20,7 @@ const commitWeight = 0.1; const scoreTimeBase = 60; const rootFolder = "."; -const stoplistFilePath = path.resolve("config", "DocProcessor", "commitStoplist.json"); +const stoplistFilePath = path.resolve("..", "tools", "doc", "commitStoplist.json"); const angFilePattern = /(component)|(directive)|(model)|(pipe)|(service)|(widget)/; diff --git a/lib/config/DocProcessor/stoplist.js b/tools/doc/stoplist.js similarity index 100% rename from lib/config/DocProcessor/stoplist.js rename to tools/doc/stoplist.js diff --git a/lib/config/DocProcessor/stoplist.ts b/tools/doc/stoplist.ts similarity index 100% rename from lib/config/DocProcessor/stoplist.ts rename to tools/doc/stoplist.ts diff --git a/lib/config/DocProcessor/templates/component.combyne b/tools/doc/templates/component.combyne similarity index 100% rename from lib/config/DocProcessor/templates/component.combyne rename to tools/doc/templates/component.combyne diff --git a/lib/config/DocProcessor/templates/directive.combyne b/tools/doc/templates/directive.combyne similarity index 100% rename from lib/config/DocProcessor/templates/directive.combyne rename to tools/doc/templates/directive.combyne diff --git a/lib/config/DocProcessor/templates/service.combyne b/tools/doc/templates/service.combyne similarity index 100% rename from lib/config/DocProcessor/templates/service.combyne rename to tools/doc/templates/service.combyne diff --git a/lib/config/DocProcessor/templates/tutIndex.combyne b/tools/doc/templates/tutIndex.combyne similarity index 100% rename from lib/config/DocProcessor/templates/tutIndex.combyne rename to tools/doc/templates/tutIndex.combyne diff --git a/lib/config/DocProcessor/templates/versIndex.combyne b/tools/doc/templates/versIndex.combyne similarity index 100% rename from lib/config/DocProcessor/templates/versIndex.combyne rename to tools/doc/templates/versIndex.combyne diff --git a/lib/config/DocProcessor/tools/index.js b/tools/doc/tools/index.js similarity index 98% rename from lib/config/DocProcessor/tools/index.js rename to tools/doc/tools/index.js index 57667073ed..902079d646 100644 --- a/lib/config/DocProcessor/tools/index.js +++ b/tools/doc/tools/index.js @@ -20,9 +20,9 @@ module.exports = { var angFilenameRegex = /([a-zA-Z0-9\-]+)\.((component)|(directive)|(model)|(pipe)|(service)|(widget))\.ts/; var searchFolderOmitRegex = /(config)|(mock)|(i18n)|(assets)|(styles)/; -var docsFolderPath = path.resolve("..", "docs"); +var docsFolderPath = path.resolve("docs"); var undocStoplistFileName = path.resolve(docsFolderPath, "undocStoplist.json"); -var rootFolder = "."; +var rootFolder = "lib"; var indexMdFilePath = path.resolve(docsFolderPath, "README.md"); var guideFolderName = "user-guide"; @@ -132,7 +132,7 @@ function aggPhase(aggData) { ] }); - fs.writeFileSync(path.resolve("..", "docs", "README.md"), remark().data("settings", {paddedTable: false}).stringify(indexFileTree)); + fs.writeFileSync(path.resolve("docs", "README.md"), remark().data("settings", {paddedTable: false}).stringify(indexFileTree)); guideSection = buildGuideSection(guideSummaryFileName, true); diff --git a/lib/config/DocProcessor/tools/seealso.js b/tools/doc/tools/seealso.js similarity index 100% rename from lib/config/DocProcessor/tools/seealso.js rename to tools/doc/tools/seealso.js diff --git a/lib/config/DocProcessor/tools/toc.js b/tools/doc/tools/toc.js similarity index 100% rename from lib/config/DocProcessor/tools/toc.js rename to tools/doc/tools/toc.js diff --git a/lib/config/DocProcessor/tools/tsInfo.js b/tools/doc/tools/tsInfo.js similarity index 98% rename from lib/config/DocProcessor/tools/tsInfo.js rename to tools/doc/tools/tsInfo.js index 62263bbd3c..fb558aae10 100644 --- a/lib/config/DocProcessor/tools/tsInfo.js +++ b/tools/doc/tools/tsInfo.js @@ -7,7 +7,7 @@ var remark = require("remark"); var combyne = require("combyne"); var typedoc_1 = require("typedoc"); var libFolders = ["core", "content-services", "process-services", "insights"]; -var templateFolder = path.resolve(".", "config", "DocProcessor", "templates"); +var templateFolder = path.resolve("tools", "doc", "templates"); var excludePatterns = [ "**/*.spec.ts" ]; @@ -182,7 +182,9 @@ function initPhase(aggData) { experimentalDecorators: true, tsconfig: "tsconfig.json" }); - var sources = app.expandInputFiles(libFolders); + var sources = app.expandInputFiles(libFolders.map(function (folder) { + return path.resolve("lib", folder); + })); aggData.projData = app.convert(sources); /* aggData.liq = liquid({ diff --git a/lib/config/DocProcessor/tools/tsInfo.ts b/tools/doc/tools/tsInfo.ts similarity index 98% rename from lib/config/DocProcessor/tools/tsInfo.ts rename to tools/doc/tools/tsInfo.ts index 1c392de5e0..dd80945f06 100644 --- a/lib/config/DocProcessor/tools/tsInfo.ts +++ b/tools/doc/tools/tsInfo.ts @@ -23,7 +23,7 @@ import { CommentTag } from "typedoc/dist/lib/models"; let libFolders = ["core", "content-services", "process-services", "insights"]; -let templateFolder = path.resolve(".", "config", "DocProcessor", "templates"); +let templateFolder = path.resolve("tools", "doc", "templates"); let excludePatterns = [ "**/*.spec.ts" @@ -265,7 +265,10 @@ export function initPhase(aggData) { tsconfig: "tsconfig.json" }); - let sources = app.expandInputFiles(libFolders); + let sources = app.expandInputFiles(libFolders.map(folder => { + return path.resolve("lib", folder); + })); + aggData.projData = app.convert(sources); /* diff --git a/lib/config/DocProcessor/tools/tscProps.js b/tools/doc/tools/tscProps.js similarity index 100% rename from lib/config/DocProcessor/tools/tscProps.js rename to tools/doc/tools/tscProps.js diff --git a/lib/config/DocProcessor/tools/tscProps.ts b/tools/doc/tools/tscProps.ts similarity index 100% rename from lib/config/DocProcessor/tools/tscProps.ts rename to tools/doc/tools/tscProps.ts diff --git a/lib/config/DocProcessor/tools/tutorialIndex.js b/tools/doc/tools/tutorialIndex.js similarity index 95% rename from lib/config/DocProcessor/tools/tutorialIndex.js rename to tools/doc/tools/tutorialIndex.js index 5651376aa5..7f5524e028 100644 --- a/lib/config/DocProcessor/tools/tutorialIndex.js +++ b/tools/doc/tools/tutorialIndex.js @@ -8,9 +8,9 @@ var frontMatter = require("remark-frontmatter"); var yaml = require("js-yaml"); var combyne = require("combyne"); var unist = require("../unistHelpers"); -var tutFolder = path.resolve("..", "docs", "tutorials"); -var templateFolder = path.resolve(".", "config", "DocProcessor", "templates"); -var userGuideFolder = path.resolve("..", "docs", "user-guide"); +var tutFolder = path.resolve("docs", "tutorials"); +var templateFolder = path.resolve("tools", "doc", "templates"); +var userGuideFolder = path.resolve("docs", "user-guide"); function initPhase(aggData) { } exports.initPhase = initPhase; function readPhase(tree, pathname, aggData) { } diff --git a/lib/config/DocProcessor/tools/tutorialIndex.ts b/tools/doc/tools/tutorialIndex.ts similarity index 94% rename from lib/config/DocProcessor/tools/tutorialIndex.ts rename to tools/doc/tools/tutorialIndex.ts index a4b5ee865c..131f2000b8 100644 --- a/lib/config/DocProcessor/tools/tutorialIndex.ts +++ b/tools/doc/tools/tutorialIndex.ts @@ -10,9 +10,9 @@ import * as combyne from "combyne"; import * as unist from "../unistHelpers"; -const tutFolder = path.resolve("..", "docs", "tutorials"); -const templateFolder = path.resolve(".", "config", "DocProcessor", "templates"); -const userGuideFolder = path.resolve("..", "docs", "user-guide"); +const tutFolder = path.resolve("docs", "tutorials"); +const templateFolder = path.resolve("tools", "doc", "templates"); +const userGuideFolder = path.resolve("docs", "user-guide"); export function initPhase(aggData) {} diff --git a/lib/config/DocProcessor/tools/typeLinker.js b/tools/doc/tools/typeLinker.js similarity index 99% rename from lib/config/DocProcessor/tools/typeLinker.js rename to tools/doc/tools/typeLinker.js index aad4a34614..2f1f17ab59 100644 --- a/lib/config/DocProcessor/tools/typeLinker.js +++ b/tools/doc/tools/typeLinker.js @@ -10,7 +10,7 @@ var includedNodeTypes = [ "table", "tableRow", "tableCell", "emphasis", "strong", "link", "text" ]; -var docFolder = path.resolve("..", "docs"); +var docFolder = path.resolve("docs"); var adfLibNames = ["core", "content-services", "insights", "process-services"]; function initPhase(aggData) { aggData.docFiles = {}; diff --git a/lib/config/DocProcessor/tools/typeLinker.ts b/tools/doc/tools/typeLinker.ts similarity index 99% rename from lib/config/DocProcessor/tools/typeLinker.ts rename to tools/doc/tools/typeLinker.ts index aa3d45f571..ac62840552 100644 --- a/lib/config/DocProcessor/tools/typeLinker.ts +++ b/tools/doc/tools/typeLinker.ts @@ -28,7 +28,7 @@ const includedNodeTypes = [ "link", "text" ]; -const docFolder = path.resolve("..", "docs"); +const docFolder = path.resolve("docs"); const adfLibNames = ["core", "content-services", "insights", "process-services"]; diff --git a/lib/config/DocProcessor/tools/versionIndex.js b/tools/doc/tools/versionIndex.js similarity index 96% rename from lib/config/DocProcessor/tools/versionIndex.js rename to tools/doc/tools/versionIndex.js index 02766d78f9..1e2e102e93 100644 --- a/lib/config/DocProcessor/tools/versionIndex.js +++ b/tools/doc/tools/versionIndex.js @@ -22,13 +22,13 @@ module.exports = { var angFilenameRegex = /([a-zA-Z0-9\-]+)\.((component)|(directive)|(model)|(pipe)|(service)|(widget))\.ts/; -var docsFolderPath = path.resolve("..", "docs"); +var docsFolderPath = path.resolve("docs"); var histFilePath = path.resolve(docsFolderPath, "versionIndex.md"); var histSectionName = "history"; var initialVersion = "v2.0.0"; -var templateFolder = path.resolve(".", "config", "DocProcessor", "templates"); +var templateFolder = path.resolve("tools", "doc", "templates"); function initPhase(aggData) { aggData.versions = { "v2.0.0":[] }; diff --git a/lib/config/DocProcessor/unistHelpers.js b/tools/doc/unistHelpers.js similarity index 100% rename from lib/config/DocProcessor/unistHelpers.js rename to tools/doc/unistHelpers.js diff --git a/tools/schematics/adf/.gitignore b/tools/schematics/adf/.gitignore new file mode 100644 index 0000000000..82677b5884 --- /dev/null +++ b/tools/schematics/adf/.gitignore @@ -0,0 +1,18 @@ +# Outputs +src/**/*.js +src/**/*.js.map +src/**/*.d.ts + +# IDEs +.idea/ +jsconfig.json +.vscode/ + +# Misc +node_modules/ +npm-debug.log* +yarn-error.log* + +# Mac OSX Finder files. +**/.DS_Store +.DS_Store diff --git a/tools/schematics/adf/.npmignore b/tools/schematics/adf/.npmignore new file mode 100644 index 0000000000..c55ccfc3f5 --- /dev/null +++ b/tools/schematics/adf/.npmignore @@ -0,0 +1,3 @@ +# Ignores TypeScript files, but keeps definitions. +*.ts +!*.d.ts diff --git a/tools/schematics/adf/README.md b/tools/schematics/adf/README.md new file mode 100644 index 0000000000..db184df134 --- /dev/null +++ b/tools/schematics/adf/README.md @@ -0,0 +1,34 @@ +# ADF doc generator schematic + +**Caution:** Although this tool should not be able to do any harm, it is still at the +experimental stage. Check the results if you use it for anything "serious". + +This [schematic](https://github.com/angular/devkit/tree/master/packages/angular_devkit/schematics) +works with [Angular CLI](https://cli.angular.io/) to make it easier to generate new +component doc files for ADF. + +## Setup + +The schematic uses Angular CLI, so you must first install this tool using the instructions +on their [GitHub page](https://github.com/angular/angular-cli), if you have not already done so. + +To set up the schematic itself for use, `cd` into the root `alfresco-ng2-components` folder and type: + + npm link tools\schematics\adf + +## Usage + +The schematic works with the `ng generate` command. The name of the schematic is `adf:docpage` and +it also requires the library name and filename as parameters. The general format is: + + ng generate adf:docpage lib/comp-name.type.md + +Here, `lib` is one of the ADF libraries (`content-services`, `core`, `process-services` +or `insights`). The `type` portion refers to the class type the doc page refers to +(component, service, model, etc). So, + + ng generate adf:docpage core/arc-reactor.service.md + +...will generate a page for the Arc Reactor service in the core library. Note that the name of the +doc file should match the name of the Typescript file where the class is defined +(arc-reactor.service.ts, in this case). \ No newline at end of file diff --git a/tools/schematics/adf/package-lock.json b/tools/schematics/adf/package-lock.json new file mode 100644 index 0000000000..d693f5875b --- /dev/null +++ b/tools/schematics/adf/package-lock.json @@ -0,0 +1,600 @@ +{ + "name": "adf", + "version": "0.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@angular-devkit/core": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-0.5.9.tgz", + "integrity": "sha512-SH2/tvs9IGzfDDaUZ1uqLlNPTzaidPWdcT3AA3lYi4hS6ZU8zF1kGw+8Xa9CZR/3JhjMAxmNoqtIcTzt2WmlqQ==", + "requires": { + "ajv": "6.4.0", + "chokidar": "1.7.0", + "rxjs": "6.0.0", + "source-map": "0.5.7" + } + }, + "@angular-devkit/schematics": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-0.5.9.tgz", + "integrity": "sha512-4DSjQUFthXqoDlZ5+ml2UvxlP29fv08FeVRbkKgofNSqC3N4QiCn/8I2PksGzcdHAXTiBGmBcgXwGbDb5zTkqA==", + "requires": { + "@angular-devkit/core": "0.5.9", + "@ngtools/json-schema": "1.1.0", + "rxjs": "6.0.0" + } + }, + "@ngtools/json-schema": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@ngtools/json-schema/-/json-schema-1.1.0.tgz", + "integrity": "sha1-w6DFRNYjkqzCgTpCyKDcb1j4aSI=" + }, + "@types/jasmine": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.6.tgz", + "integrity": "sha512-clg9raJTY0EOo5pVZKX3ZlMjlYzVU73L71q5OV1jhE2Uezb7oF94jh4CvwrW6wInquQAdhOxJz5VDF2TLUGmmA==" + }, + "@types/node": { + "version": "8.10.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.10.tgz", + "integrity": "sha512-p3W/hFzQs76RlYRIZsZc5a9bht6m0TspmWYYbKhRswmLnwj9fsE40EbuGifeu/XWR/c0UJQ1DDbvTxIsm/OOAA==" + }, + "ajv": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.4.0.tgz", + "integrity": "sha1-06/3jpJ3VJdx2vAWTP9ISCt1T8Y=", + "requires": { + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1", + "uri-js": "3.0.2" + } + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "requires": { + "micromatch": "2.3.11", + "normalize-path": "2.1.1" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "1.1.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "1.8.2", + "preserve": "0.2.0", + "repeat-element": "1.1.2" + } + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "requires": { + "anymatch": "1.3.2", + "async-each": "1.0.1", + "glob-parent": "2.0.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "2.0.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "ejs": { + "version": "2.5.9", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.9.tgz", + "integrity": "sha512-GJCAeDBKfREgkBtgrYSf9hQy9kTb3helv0zGdzqhM7iAkW8FA/ZF97VQDbwFiwIT8MQLLOe5VlPZOEvZAqtUAQ==" + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "0.1.1" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "2.2.3" + } + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "requires": { + "is-number": "2.1.0", + "isobject": "2.1.0", + "randomatic": "1.1.7", + "repeat-element": "1.1.2", + "repeat-string": "1.6.1" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "1.0.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "2.0.0", + "is-glob": "2.0.1" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "2.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "requires": { + "binary-extensions": "1.11.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "2.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "3.2.2" + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + }, + "jasmine": { + "version": "2.99.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-2.99.0.tgz", + "integrity": "sha1-jKctEC5jm4Z8ZImFbg4YqceqQrc=", + "requires": { + "exit": "0.1.2", + "glob": "7.1.2", + "jasmine-core": "2.99.1" + } + }, + "jasmine-core": { + "version": "2.99.1", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.99.1.tgz", + "integrity": "sha1-5kAN8ea1bhMLYcS80JPap/boyhU=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "2.0.0", + "array-unique": "0.2.1", + "braces": "1.8.5", + "expand-brackets": "0.1.5", + "extglob": "0.3.2", + "filename-regex": "2.0.1", + "is-extglob": "1.0.0", + "is-glob": "2.0.1", + "kind-of": "3.2.2", + "normalize-path": "2.1.1", + "object.omit": "2.0.1", + "parse-glob": "3.0.4", + "regex-cache": "0.4.4" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.11" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "1.1.0" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "0.1.5", + "is-extendable": "0.1.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "0.3.0", + "is-dotfile": "1.0.3", + "is-extglob": "1.0.0", + "is-glob": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "requires": { + "is-number": "3.0.0", + "kind-of": "4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" + } + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "requires": { + "graceful-fs": "4.1.11", + "minimatch": "3.0.4", + "readable-stream": "2.3.6", + "set-immediate-shim": "1.0.1" + } + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "requires": { + "is-equal-shallow": "0.1.3" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "rxjs": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.0.0.tgz", + "integrity": "sha512-2MgLQr1zvks8+Kip4T6hcJdiBhV+SIvxguoWjhwtSpNPTp/5e09HJbgclCwR/nW0yWzhubM+6Q0prl8G5RuoBA==", + "requires": { + "tslib": "1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "tslib": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.0.tgz", + "integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==" + }, + "typescript": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.8.3.tgz", + "integrity": "sha512-K7g15Bb6Ra4lKf7Iq2l/I5/En+hLIHmxWZGq3D4DIRNFxMNV6j2SHSvDOqs2tGd4UvD/fJvrwopzQXjLrT7Itw==" + }, + "uri-js": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-3.0.2.tgz", + "integrity": "sha1-+QuFhQf4HepNz7s8TD2/orVX+qo=", + "requires": { + "punycode": "2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } +} diff --git a/tools/schematics/adf/package.json b/tools/schematics/adf/package.json new file mode 100644 index 0000000000..cadb3331f6 --- /dev/null +++ b/tools/schematics/adf/package.json @@ -0,0 +1,24 @@ +{ + "name": "adf", + "version": "0.0.0", + "description": "A blank schematics", + "scripts": { + "build": "tsc -p tsconfig.json", + "test": "npm run build && jasmine **/*_spec.js" + }, + "keywords": [ + "schematics" + ], + "author": "", + "license": "MIT", + "schematics": "./src/collection.json", + "dependencies": { + "@angular-devkit/core": "^0.5.8", + "@angular-devkit/schematics": "^0.5.8", + "@types/jasmine": "^2.6.0", + "@types/node": "^8.0.31", + "ejs": "^2.5.9", + "jasmine": "^2.8.0", + "typescript": "^2.5.2" + } +} diff --git a/tools/schematics/adf/src/adf/index.d.ts b/tools/schematics/adf/src/adf/index.d.ts new file mode 100644 index 0000000000..757a5d40f6 --- /dev/null +++ b/tools/schematics/adf/src/adf/index.d.ts @@ -0,0 +1,2 @@ +import { Rule } from '@angular-devkit/schematics'; +export declare function docpage(options: any): Rule; diff --git a/tools/schematics/adf/src/adf/index.js b/tools/schematics/adf/src/adf/index.js new file mode 100644 index 0000000000..ebf5865248 --- /dev/null +++ b/tools/schematics/adf/src/adf/index.js @@ -0,0 +1,33 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const schematics_1 = require("@angular-devkit/schematics"); +function docpage(options) { + let nameParts = options.name.match(/([a-zA-Z-0-9_\-]+)\.(component|directive|interface|model|pipe|service|widget)/); + if (!nameParts) { + throw new schematics_1.SchematicsException('Doc filename in wrong format. Must be "lib-name/file-name.type.md"'); + } + let libFolder = options.path.match(/\/([a-zA-Z-0-9_\-]+)/)[1]; + if (!libFolder.match(/content-services|core|process-services|insights/)) { + throw new schematics_1.SchematicsException(`Folder "${libFolder}" is not a valid ADF library (must be "content-services", "core", "process-services" or "insights".`); + } + let templateContext = { + "name": options.name, + "basename": nameParts[1], + "displayName": dekebabifyName(nameParts[1]), + "type": nameParts[2] + }; + const templateSource = schematics_1.apply(schematics_1.url('./templates'), [ + schematics_1.template(templateContext), + schematics_1.move("docs/" + libFolder) + ]); + return schematics_1.chain([ + schematics_1.mergeWith(templateSource) + ]); +} +exports.docpage = docpage; +function dekebabifyName(name) { + var result = name.replace(/-/g, " "); + result = result.substr(0, 1).toUpperCase() + result.substr(1); + return result; +} +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tools/schematics/adf/src/adf/index.js.map b/tools/schematics/adf/src/adf/index.js.map new file mode 100644 index 0000000000..fe6a0d9e56 --- /dev/null +++ b/tools/schematics/adf/src/adf/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAAA,2DAGoC;AAIpC,iBAAwB,OAAY;IAClC,IAAI,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;IAEpH,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,gCAAmB,CAAC,oEAAoE,CAAC,CAAC;KACrG;IAED,IAAI,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9D,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,iDAAiD,CAAC,EAAE;QACvE,MAAM,IAAI,gCAAmB,CAAC,WAAW,SAAS,qGAAqG,CAAC,CAAC;KAC1J;IAED,IAAI,eAAe,GAAG;QAClB,MAAM,EAAE,OAAO,CAAC,IAAI;QACpB,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;QACxB,aAAa,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3C,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;KACvB,CAAA;IAED,MAAM,cAAc,GAAG,kBAAK,CAAC,gBAAG,CAAC,aAAa,CAAC,EAAE;QAC/C,qBAAQ,CAAC,eAAe,CAAC;QACzB,iBAAI,CAAC,OAAO,GAAG,SAAS,CAAC;KAC1B,CAAC,CAAC;IAEH,OAAO,kBAAK,CAAC;QACX,sBAAS,CAAC,cAAc,CAAC;KAC1B,CAAC,CAAC;AAEL,CAAC;AA7BD,0BA6BC;AAGD,wBAAwB,IAAY;IAClC,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACrC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC9D,OAAO,MAAM,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/tools/schematics/adf/src/adf/index_spec.d.ts b/tools/schematics/adf/src/adf/index_spec.d.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/tools/schematics/adf/src/adf/index_spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/tools/schematics/adf/src/adf/index_spec.js b/tools/schematics/adf/src/adf/index_spec.js new file mode 100644 index 0000000000..57df0c0dce --- /dev/null +++ b/tools/schematics/adf/src/adf/index_spec.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const schematics_1 = require("@angular-devkit/schematics"); +const testing_1 = require("@angular-devkit/schematics/testing"); +const path = require("path"); +const collectionPath = path.join(__dirname, '../collection.json'); +describe('adf', () => { + it('works', () => { + const runner = new testing_1.SchematicTestRunner('schematics', collectionPath); + const tree = runner.runSchematic('adf', {}, schematics_1.Tree.empty()); + expect(tree.files).toEqual([]); + }); +}); +//# sourceMappingURL=index_spec.js.map \ No newline at end of file diff --git a/tools/schematics/adf/src/adf/index_spec.js.map b/tools/schematics/adf/src/adf/index_spec.js.map new file mode 100644 index 0000000000..310bcf9a4a --- /dev/null +++ b/tools/schematics/adf/src/adf/index_spec.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;AAAA,2DAAkD;AAClD,gEAAyE;AACzE,6BAA6B;AAG7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAGlE,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;IACnB,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QACf,MAAM,MAAM,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,EAAE,iBAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAE1D,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/tools/schematics/adf/src/adf/templates/__basename__.__type__.md b/tools/schematics/adf/src/adf/templates/__basename__.__type__.md new file mode 100644 index 0000000000..64ee3b41b8 --- /dev/null +++ b/tools/schematics/adf/src/adf/templates/__basename__.__type__.md @@ -0,0 +1,34 @@ +--- +Added: v2.4.0 +Status: Active +--- + +# <%= displayName + " " + type %> + +One-line description for the index page goes here. + +![Screenshot if required](../docassets/images/<%= basename + "." + type %>.png) + +## Basic usage + +Typescript and/or HTML usage sample goes here. Delete this section if you +don't need it. + +## Class members + +Don't add anything here. Use "npm run docbuild" from the "lib" +folder to generate property and method tables from the JSDocs. + +## Details + +Main text goes here. + +### Subsection + +Use level 3 subsections within the Details section to introduce +topics. + +## See also + +- [Delete this section](link1.md) +- [if you don't need it](link2.md) diff --git a/tools/schematics/adf/src/collection.json b/tools/schematics/adf/src/collection.json new file mode 100644 index 0000000000..61f20130cc --- /dev/null +++ b/tools/schematics/adf/src/collection.json @@ -0,0 +1,9 @@ +{ + "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json", + "schematics": { + "docpage": { + "description": "Creates a new documentation file for an ADF component.", + "factory": "./adf/index#docpage" + } + } +} diff --git a/tools/schematics/adf/tsconfig.json b/tools/schematics/adf/tsconfig.json new file mode 100644 index 0000000000..0b296985db --- /dev/null +++ b/tools/schematics/adf/tsconfig.json @@ -0,0 +1,34 @@ +{ + "compilerOptions": { + "baseUrl": "tsconfig", + "lib": [ + "es2017", + "dom" + ], + "declaration": true, + "module": "commonjs", + "moduleResolution": "node", + "noEmitOnError": true, + "noFallthroughCasesInSwitch": true, + "noImplicitAny": true, + "noImplicitThis": true, + "noUnusedParameters": true, + "noUnusedLocals": true, + "rootDir": "src/", + "skipDefaultLibCheck": true, + "skipLibCheck": true, + "sourceMap": true, + "strictNullChecks": true, + "target": "es6", + "types": [ + "jasmine", + "node" + ] + }, + "include": [ + "src/**/*" + ], + "exclude": [ + "src/*/files/**/*" + ] +}