mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-30 18:15:11 +00:00
remove old unmaintained sub-projects (#5798)
* remove old unmaintained sub-projects * add missing dependency
This commit is contained in:
parent
2a5fa954bd
commit
8ba36ea21c
@ -114,7 +114,7 @@ export class AlfrescoApiService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async reset() {
|
reset() {
|
||||||
this.initAlfrescoApi();
|
this.initAlfrescoApi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
"flatModuleFile": "adf-extensions",
|
"flatModuleFile": "adf-extensions",
|
||||||
"umdModuleIds": {
|
"umdModuleIds": {
|
||||||
"@alfresco/js-api": "@alfresco/js-api",
|
"@alfresco/js-api": "@alfresco/js-api",
|
||||||
"minimatch": "minimatch",
|
|
||||||
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
"@angular/platform-browser/animations": "@angular/platform-browser/animations",
|
||||||
"@angular/material": "@angular/material",
|
"@angular/material": "@angular/material",
|
||||||
"@mat-datetimepicker": "@mat-datetimepicker",
|
"@mat-datetimepicker": "@mat-datetimepicker",
|
||||||
|
@ -74,7 +74,7 @@ export class ClaimTaskCloudDirective implements OnInit {
|
|||||||
@HostListener('click')
|
@HostListener('click')
|
||||||
async onClick() {
|
async onClick() {
|
||||||
try {
|
try {
|
||||||
await await this.claimTask();
|
await this.claimTask();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.error.emit(error);
|
this.error.emit(error);
|
||||||
}
|
}
|
||||||
|
12
package-lock.json
generated
12
package-lock.json
generated
@ -79,9 +79,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@alfresco/js-api": {
|
"@alfresco/js-api": {
|
||||||
"version": "3.9.0-e493d078d3320858e4dcb2e1c9aab2a0a3c67214",
|
"version": "3.9.0-950960d33311892285426ba00df8204055d7185f",
|
||||||
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.9.0-e493d078d3320858e4dcb2e1c9aab2a0a3c67214.tgz",
|
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.9.0-950960d33311892285426ba00df8204055d7185f.tgz",
|
||||||
"integrity": "sha512-PMLSQ/L1s4L7wh4BTvmtAgJUxzptN/GYsY2mbEzNBp5xF+BBsrvgcxJUb56MFo+Gf1rPJo2uJAYdsSu7sl+EqQ==",
|
"integrity": "sha512-tbraAJgz5ltDoxsHM2Nnrhw8ij0xlVYnnYqCvGEToXo9hVAL+8rEL09qhKK8PrqE94xSE/F23BWjiLYv1E9hqw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"event-emitter": "^0.3.5",
|
"event-emitter": "^0.3.5",
|
||||||
"minimatch": "3.0.4",
|
"minimatch": "3.0.4",
|
||||||
@ -18352,9 +18352,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mime": {
|
"mime": {
|
||||||
"version": "2.4.5",
|
"version": "2.4.6",
|
||||||
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.5.tgz",
|
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
|
||||||
"integrity": "sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w=="
|
"integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA=="
|
||||||
},
|
},
|
||||||
"qs": {
|
"qs": {
|
||||||
"version": "6.9.4",
|
"version": "6.9.4",
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
"@alfresco/adf-insights": "3.9.0-1def8000f06e92a78297806a760be7fabdda3c6f",
|
"@alfresco/adf-insights": "3.9.0-1def8000f06e92a78297806a760be7fabdda3c6f",
|
||||||
"@alfresco/adf-process-services": "3.9.0-1def8000f06e92a78297806a760be7fabdda3c6f",
|
"@alfresco/adf-process-services": "3.9.0-1def8000f06e92a78297806a760be7fabdda3c6f",
|
||||||
"@alfresco/adf-process-services-cloud": "3.9.0-1def8000f06e92a78297806a760be7fabdda3c6f",
|
"@alfresco/adf-process-services-cloud": "3.9.0-1def8000f06e92a78297806a760be7fabdda3c6f",
|
||||||
"@alfresco/js-api": "3.9.0-e493d078d3320858e4dcb2e1c9aab2a0a3c67214",
|
"@alfresco/js-api": "3.9.0-950960d33311892285426ba00df8204055d7185f",
|
||||||
"@angular/animations": "^7.2.15",
|
"@angular/animations": "^7.2.15",
|
||||||
"@angular/cdk": "7.3.7",
|
"@angular/cdk": "7.3.7",
|
||||||
"@angular/common": "^7.2.15",
|
"@angular/common": "^7.2.15",
|
||||||
@ -108,6 +108,7 @@
|
|||||||
"core-js": "^2.5.4",
|
"core-js": "^2.5.4",
|
||||||
"custom-event-polyfill": "0.3.0",
|
"custom-event-polyfill": "0.3.0",
|
||||||
"hammerjs": "2.0.8",
|
"hammerjs": "2.0.8",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
"minimatch-browser": "1.0.0",
|
"minimatch-browser": "1.0.0",
|
||||||
"moment": "2.22.2",
|
"moment": "2.22.2",
|
||||||
"moment-es6": "^1.0.0",
|
"moment-es6": "^1.0.0",
|
||||||
@ -136,6 +137,7 @@
|
|||||||
"@types/hammerjs": "2.0.35",
|
"@types/hammerjs": "2.0.35",
|
||||||
"@types/jasmine": "~2.8.3",
|
"@types/jasmine": "~2.8.3",
|
||||||
"@types/jasminewd2": "~2.0.2",
|
"@types/jasminewd2": "~2.0.2",
|
||||||
|
"@types/minimatch": "^3.0.3",
|
||||||
"@types/node": "^12.7.7",
|
"@types/node": "^12.7.7",
|
||||||
"@types/pdfjs-dist": "^2.1.3",
|
"@types/pdfjs-dist": "^2.1.3",
|
||||||
"@types/selenium-webdriver": "^3.0.8",
|
"@types/selenium-webdriver": "^3.0.8",
|
||||||
|
@ -1,66 +0,0 @@
|
|||||||
# UI text style guide in rule form
|
|
||||||
|
|
||||||
This document lists the guidelines from the
|
|
||||||
[Alfresco UI style guide](https://docs.alfresco.com/sites/docs.alfresco.com/files/public/docs_team/u2/Alfresco-Writing-Guide.pdf)
|
|
||||||
in the form of separate rules. The list can be as a check to identify
|
|
||||||
specific types of mistake and suggest solutions. However, the main
|
|
||||||
[style guide](https://docs.alfresco.com/sites/docs.alfresco.com/files/public/docs_team/u2/Alfresco-Writing-Guide.pdf)
|
|
||||||
remains the definitive source for the guidelines and explains and develops the reasons for
|
|
||||||
style choices in greater depth.
|
|
||||||
|
|
||||||
## Rules
|
|
||||||
|
|
||||||
### SG0001: Avoid polite words ("please", "thank you")
|
|
||||||
|
|
||||||
People tend to find direct commands ("do this", "go here") rude in everyday conversation but, in UI text, the meaning is very different.
|
|
||||||
Saying "use xxx to solve problem yyy" reads as a recommendation
|
|
||||||
("if you think you have problem yyy then using xxx is a good way to solve it").
|
|
||||||
Using expressions like "please", "thank you", and "feel free" takes up space and makes the text less direct and easy to read.
|
|
||||||
|
|
||||||
### SG0002: Avoid interjections ("oops", "wow", "yeah")
|
|
||||||
|
|
||||||
It is quite common for UI text in other products to include words like this to add a bit of fun to the UI.
|
|
||||||
However, it is Alfresco's style to avoid these words to keep the UI more "serious" and professional.
|
|
||||||
|
|
||||||
### SG0003: Avoid exclamations ("!")
|
|
||||||
|
|
||||||
Exclamations generally look as though they are supposed to be funny or angry. This doesn't
|
|
||||||
fit in well with Alfresco's professional UI style.
|
|
||||||
|
|
||||||
### SG0004: Avoid unusual punctuation (";", "~", "^")
|
|
||||||
|
|
||||||
These punctuation marks are valid in English but their meaning is often subtle and they
|
|
||||||
are rarely used. The text is generally clearer without them, especially for a user who isn't
|
|
||||||
a native English speaker.
|
|
||||||
|
|
||||||
### SG0005: Don't use the ampersand ("&") as a replacement for "and"
|
|
||||||
|
|
||||||
The ampersand ("&") character is common in signs and captions but isn't normally used in
|
|
||||||
messages and body text. Use the word "and" in full.
|
|
||||||
|
|
||||||
### SG0006: Write numbers using digits instead of words
|
|
||||||
|
|
||||||
Numbers take up a lot more screen space when they are written out as words ("one hundred
|
|
||||||
and twenty three") rather than digits ("123"). Style guides differ on this issue but Alfresco's
|
|
||||||
style is to prefer digits over words when writing numbers. The exception is for numbers from
|
|
||||||
1 million upwards. For these, write digits followed by "million", "billion", etc. Something like
|
|
||||||
"10 billion" is easier to read than 10000000000.
|
|
||||||
|
|
||||||
### SG0007: Contractions ("can't", "won't" "isn't") are usually better than the equivalent phrase
|
|
||||||
|
|
||||||
Contractions such as "can't", "won't" and "isn't" are shorter and more familiar than "cannot",
|
|
||||||
"will not", "is not" and help to make the UI seem a bit friendlier. Avoid the full phrase except
|
|
||||||
in cases where you want to emphasise an instruction very strongly ("Do not change these settings
|
|
||||||
unless you are sure you need to do so").
|
|
||||||
|
|
||||||
### SG0008: Leave out trademark and copyright symbols
|
|
||||||
|
|
||||||
There is no legal requirement to use trademark and copyright symbols ("™", "©", "®") in UI
|
|
||||||
text. They will be covered in the docs if they are needed at all, so don't use them in the UI.
|
|
||||||
|
|
||||||
### SG0009: Avoid abbreviations for common phrases ("etc", "e.g.")
|
|
||||||
|
|
||||||
Abbreviations that represent English phrases ("i.e.", "etc") tend to read awkwardly and
|
|
||||||
so they should be avoided in UI text. The exception is OK, which is widely used.
|
|
||||||
However, abbreviations and acronyms for well-known products and terms (ADF, SDK)
|
|
||||||
are fine.
|
|
@ -1,25 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
var fs = require("fs");
|
|
||||||
var path = require("path");
|
|
||||||
var program = require("commander");
|
|
||||||
var SGStyleRules_1 = require("./li18nt/server/src/SGStyleRules");
|
|
||||||
program
|
|
||||||
.usage(" <source>")
|
|
||||||
.parse(process.argv);
|
|
||||||
if (program.args.length === 0) {
|
|
||||||
console.log('Error: source file "en.json" must be provided');
|
|
||||||
process.exit();
|
|
||||||
}
|
|
||||||
var text = fs.readFileSync(path.resolve(program.args[0]), 'utf8');
|
|
||||||
var lines = text.split(/\r?\n/g);
|
|
||||||
var messages = [];
|
|
||||||
lines.forEach(function (line, index) {
|
|
||||||
SGStyleRules_1.rules.forEach(function (rule) {
|
|
||||||
var newProblems = rule(line, index);
|
|
||||||
messages.push.apply(messages, newProblems);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
messages.forEach(function (message) {
|
|
||||||
console.log("Line " + message.lineNum + " (" + message.startCharPos + "-" + message.endCharPos + "): " + SGStyleRules_1.sgErrorMessages[message.messageCode]);
|
|
||||||
});
|
|
@ -1,33 +0,0 @@
|
|||||||
import * as fs from 'fs';
|
|
||||||
import * as path from 'path';
|
|
||||||
import * as program from 'commander';
|
|
||||||
|
|
||||||
import {
|
|
||||||
SGStringProblem, sgErrorMessages, rules
|
|
||||||
} from './li18nt/server/src/SGStyleRules';
|
|
||||||
|
|
||||||
|
|
||||||
program
|
|
||||||
.usage(" <source>")
|
|
||||||
.parse(process.argv);
|
|
||||||
|
|
||||||
if (program.args.length === 0) {
|
|
||||||
console.log('Error: source file "en.json" must be provided');
|
|
||||||
process.exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
let text = fs.readFileSync(path.resolve(program.args[0]), 'utf8');
|
|
||||||
|
|
||||||
let lines = text.split(/\r?\n/g);
|
|
||||||
let messages: SGStringProblem[] = [];
|
|
||||||
|
|
||||||
lines.forEach((line, index) => {
|
|
||||||
rules.forEach(rule => {
|
|
||||||
let newProblems = rule(line, index);
|
|
||||||
messages.push(...newProblems);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
messages.forEach(message => {
|
|
||||||
console.log(`Line ${message.lineNum} (${message.startCharPos}-${message.endCharPos}): ${sgErrorMessages[message.messageCode]}`)
|
|
||||||
});
|
|
3
tools/i18n/li18nt/.gitignore
vendored
3
tools/i18n/li18nt/.gitignore
vendored
@ -1,3 +0,0 @@
|
|||||||
out
|
|
||||||
node_modules
|
|
||||||
client/server
|
|
32
tools/i18n/li18nt/.vscode/launch.json
vendored
32
tools/i18n/li18nt/.vscode/launch.json
vendored
@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "0.2.0",
|
|
||||||
// List of configurations. Add new configurations or edit existing ones.
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "Launch Client",
|
|
||||||
"type": "extensionHost",
|
|
||||||
"request": "launch",
|
|
||||||
"runtimeExecutable": "${execPath}",
|
|
||||||
"args": [
|
|
||||||
"--extensionDevelopmentPath=${workspaceRoot}/client"
|
|
||||||
],
|
|
||||||
"stopOnEntry": false,
|
|
||||||
"sourceMaps": true,
|
|
||||||
"outFiles": [
|
|
||||||
"${workspaceRoot}/client/out/**/*.js"
|
|
||||||
],
|
|
||||||
"preLaunchTask": "watch:client"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Attach to Server",
|
|
||||||
"type": "node",
|
|
||||||
"request": "attach",
|
|
||||||
"port": 6009,
|
|
||||||
"sourceMaps": true,
|
|
||||||
"outFiles": [
|
|
||||||
"${workspaceRoot}/client/server/**/*.js"
|
|
||||||
],
|
|
||||||
"preLaunchTask": "watch:server"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
15
tools/i18n/li18nt/.vscode/settings.json
vendored
15
tools/i18n/li18nt/.vscode/settings.json
vendored
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
// set to false to hide directory from the VS Code Document Sidebar
|
|
||||||
"files.exclude": {
|
|
||||||
"client/out/**/*": false,
|
|
||||||
"client/server/**/*": false,
|
|
||||||
"client/node_modules": false,
|
|
||||||
"server/node_modules": false
|
|
||||||
},
|
|
||||||
// set this to false to include "out" folder in search results
|
|
||||||
"search.exclude": {
|
|
||||||
"out": true
|
|
||||||
},
|
|
||||||
"typescript.tsdk": "./node_modules/typescript/lib",
|
|
||||||
"typescript.tsc.autoDetect": "off"
|
|
||||||
}
|
|
79
tools/i18n/li18nt/.vscode/tasks.json
vendored
79
tools/i18n/li18nt/.vscode/tasks.json
vendored
@ -1,79 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "compile",
|
|
||||||
"dependsOn": [
|
|
||||||
"compile:client",
|
|
||||||
"compile:server"
|
|
||||||
],
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "compile:client",
|
|
||||||
"type": "npm",
|
|
||||||
"script": "compile:client",
|
|
||||||
"group": "build",
|
|
||||||
"presentation": {
|
|
||||||
"panel": "dedicated",
|
|
||||||
"reveal": "never"
|
|
||||||
},
|
|
||||||
"problemMatcher": [
|
|
||||||
"$tsc"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "compile:server",
|
|
||||||
"type": "npm",
|
|
||||||
"script": "compile:server",
|
|
||||||
"group": "build",
|
|
||||||
"presentation": {
|
|
||||||
"panel": "dedicated",
|
|
||||||
"reveal": "never"
|
|
||||||
},
|
|
||||||
"problemMatcher": [
|
|
||||||
"$tsc"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "watch",
|
|
||||||
"dependsOn": [
|
|
||||||
"watch:client",
|
|
||||||
"watch:server"
|
|
||||||
],
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"problemMatcher": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "watch:client",
|
|
||||||
"type": "npm",
|
|
||||||
"script": "watch:client",
|
|
||||||
"isBackground": true,
|
|
||||||
"group": "build",
|
|
||||||
"presentation": {
|
|
||||||
"panel": "dedicated",
|
|
||||||
"reveal": "never"
|
|
||||||
},
|
|
||||||
"problemMatcher": [
|
|
||||||
"$tsc-watch"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "watch:server",
|
|
||||||
"type": "npm",
|
|
||||||
"script": "watch:server",
|
|
||||||
"isBackground": true,
|
|
||||||
"group": "build",
|
|
||||||
"presentation": {
|
|
||||||
"panel": "dedicated",
|
|
||||||
"reveal": "never"
|
|
||||||
},
|
|
||||||
"problemMatcher": [
|
|
||||||
"$tsc-watch"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
# li18nt UI text style checker
|
|
||||||
|
|
||||||
The purpose of this tool is to provide style "lint" checking for the en.json
|
|
||||||
file, which is used as the starting point for i18n in the user interface. The
|
|
||||||
definitive guidelines can be found in the main
|
|
||||||
[style guide](https://docs.alfresco.com/sites/docs.alfresco.com/files/public/docs_team/u2/Alfresco-Writing-Guide.pdf) document. This tool implements the guidelines as a set of rules that can be
|
|
||||||
checked automatically for common errors (the [style rules](../UIStyleRules.md) file
|
|
||||||
contains a full description of the rules currently in use).
|
|
||||||
|
|
||||||
## Installing and using the VSCode extension
|
|
||||||
|
|
||||||
The VS Code extension shows the style warnings as underlined sections in the text
|
|
||||||
with corresponding notes in the Problems window, a lot like standard programming
|
|
||||||
language errors.
|
|
||||||
|
|
||||||
The extension is not available in the VS Code marketplace but you can install it
|
|
||||||
locally by copying it to the extensions folder. This can be found at the path
|
|
||||||
|
|
||||||
`$HOME/.vscode/extensions`
|
|
||||||
|
|
||||||
...on MacOSX and at
|
|
||||||
|
|
||||||
`%USERPROFILE%\.vscode\extensions`
|
|
||||||
|
|
||||||
...on Windows. Copy the `client` folder (from `alfresco-ng2-components/tools/i18n/li18nt/`)
|
|
||||||
to the extensions folder and rename it to `li18nt`. If there is no `node_modules`
|
|
||||||
folder in the new `li18nt` folder then you should also `cd` into this folder and
|
|
||||||
run `npm install`. When you restart VS Code, you should find `li18nt` listed among
|
|
||||||
the installed extensions in the extensions panel.
|
|
||||||
|
|
||||||
When active, the extension will only check the text of files named `en.json`.
|
|
||||||
Double-click an item from the Problems window in VS Code to highlight the section
|
|
||||||
of text where the issue occurs. You can find out more about why the error has
|
|
||||||
occurred and what to do about it in the [style rules](../UIStyleRules.md) file.
|
|
||||||
For the full description and explanation of all style guidelines, see the main
|
|
||||||
[style guide](https://docs.alfresco.com/sites/docs.alfresco.com/files/public/docs_team/u2/Alfresco-Writing-Guide.pdf).
|
|
@ -1,9 +0,0 @@
|
|||||||
.vscode/**
|
|
||||||
typings/**
|
|
||||||
out/test/**
|
|
||||||
test/**
|
|
||||||
src/**
|
|
||||||
**/*.map
|
|
||||||
.gitignore
|
|
||||||
tsconfig.json
|
|
||||||
vsc-extension-quickstart.md
|
|
1795
tools/i18n/li18nt/client/package-lock.json
generated
1795
tools/i18n/li18nt/client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,58 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "li18nt",
|
|
||||||
"description": "Style checker for ADF translation files.",
|
|
||||||
"author": "Alfresco Software",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"publisher": "vscode",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/Alfresco/alfresco-ng2-components"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"vscode": "^1.22.0"
|
|
||||||
},
|
|
||||||
"categories": [
|
|
||||||
"Other"
|
|
||||||
],
|
|
||||||
"activationEvents": [
|
|
||||||
"onLanguage:json"
|
|
||||||
],
|
|
||||||
"main": "./out/src/extension",
|
|
||||||
"contributes": {
|
|
||||||
"configuration": {
|
|
||||||
"type": "object",
|
|
||||||
"title": "Main configuration",
|
|
||||||
"properties": {
|
|
||||||
"li18nt.maxNumberOfProblems": {
|
|
||||||
"scope": "resource",
|
|
||||||
"type": "number",
|
|
||||||
"default": 100,
|
|
||||||
"description": "Controls the maximum number of problems produced by the server."
|
|
||||||
},
|
|
||||||
"li18nt.trace.server": {
|
|
||||||
"scope": "window",
|
|
||||||
"type": "string",
|
|
||||||
"enum": [
|
|
||||||
"off",
|
|
||||||
"messages",
|
|
||||||
"verbose"
|
|
||||||
],
|
|
||||||
"default": "off",
|
|
||||||
"description": "Traces the communication between VSCode and the language server."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"vscode:prepublish": "tsc -p ./",
|
|
||||||
"compile": "tsc -p ./",
|
|
||||||
"watch": "tsc -w -p ./",
|
|
||||||
"update-vscode": "node ./node_modules/vscode/bin/install",
|
|
||||||
"postinstall": "node ./node_modules/vscode/bin/install"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"vscode": "^1.1.34",
|
|
||||||
"vscode-languageclient": "^5.2.1"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
import { workspace, ExtensionContext } from 'vscode';
|
|
||||||
import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } from 'vscode-languageclient';
|
|
||||||
|
|
||||||
export function activate(context: ExtensionContext) {
|
|
||||||
|
|
||||||
// The server is implemented in node
|
|
||||||
let serverModule = context.asAbsolutePath(path.join('server', 'server.js'));
|
|
||||||
// The debug options for the server
|
|
||||||
let debugOptions = { execArgv: ["--nolazy", "--inspect=6009"] };
|
|
||||||
|
|
||||||
// If the extension is launched in debug mode then the debug server options are used
|
|
||||||
// Otherwise the run options are used
|
|
||||||
let serverOptions: ServerOptions = {
|
|
||||||
run : { module: serverModule, transport: TransportKind.ipc },
|
|
||||||
debug: { module: serverModule, transport: TransportKind.ipc, options: debugOptions }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Options to control the language client
|
|
||||||
let clientOptions: LanguageClientOptions = {
|
|
||||||
// Register the server for plain text documents
|
|
||||||
documentSelector: [{scheme: 'file', language: 'json'}],
|
|
||||||
synchronize: {
|
|
||||||
// Synchronize the setting section 'languageServerExample' to the server
|
|
||||||
configurationSection: 'li18nt',
|
|
||||||
// Notify the server about file changes to '.clientrc files contain in the workspace
|
|
||||||
fileEvents: workspace.createFileSystemWatcher('**/.clientrc')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the language client and start the client.
|
|
||||||
let disposable = new LanguageClient('li18nt', 'li18nt', serverOptions, clientOptions).start();
|
|
||||||
|
|
||||||
// Push the disposable to the context's subscriptions so that the
|
|
||||||
// client can be deactivated on extension deactivation
|
|
||||||
context.subscriptions.push(disposable);
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"noUnusedLocals": true,
|
|
||||||
"noUnusedParameters": true,
|
|
||||||
"noImplicitAny": true,
|
|
||||||
"noImplicitReturns": true,
|
|
||||||
"target": "es6",
|
|
||||||
"module": "commonjs",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"rootDir": ".",
|
|
||||||
"outDir": "out",
|
|
||||||
"lib": [ "es2016" ],
|
|
||||||
"sourceMap": true
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
"server"
|
|
||||||
]
|
|
||||||
}
|
|
5
tools/i18n/li18nt/package-lock.json
generated
5
tools/i18n/li18nt/package-lock.json
generated
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "lsp--sample",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"lockfileVersion": 1
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "li18nt",
|
|
||||||
"description": "Style checker for ADF translation files",
|
|
||||||
"author": "Alfresco Software",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"publisher": "vscode",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/Alfresco/alfresco-ng2-components"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"postinstall": "cd server && npm install && cd ../client && npm install && cd ..",
|
|
||||||
"compile": "tsc -p client/tsconfig.json && cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json",
|
|
||||||
"compile:client": "tsc -p client/tsconfig.json",
|
|
||||||
"watch:client": "tsc -w -p client/tsconfig.json",
|
|
||||||
"compile:server": "cd server && npm run installServer && cd .. && tsc -p server/tsconfig.json",
|
|
||||||
"watch:server": "cd server && npm run installServer && cd .. && tsc -w -p server/tsconfig.json"
|
|
||||||
},
|
|
||||||
"devDependencies": {}
|
|
||||||
}
|
|
41
tools/i18n/li18nt/server/package-lock.json
generated
41
tools/i18n/li18nt/server/package-lock.json
generated
@ -1,41 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "lsp-sample",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"lockfileVersion": 1,
|
|
||||||
"requires": true,
|
|
||||||
"dependencies": {
|
|
||||||
"vscode-jsonrpc": {
|
|
||||||
"version": "3.6.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.6.2.tgz",
|
|
||||||
"integrity": "sha512-T24Jb5V48e4VgYliUXMnZ379ItbrXgOimweKaJshD84z+8q7ZOZjJan0MeDe+Ugb+uqERDVV8SBmemaGMSMugA=="
|
|
||||||
},
|
|
||||||
"vscode-languageserver": {
|
|
||||||
"version": "4.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-4.1.3.tgz",
|
|
||||||
"integrity": "sha512-D6p3q9x8QPtPLRUO5d2UKizjFYfg8zLVJqKoMpAaom8Wuhl1oKRCjeLg+Cp4mgPeCwR71wbgX2BM/jL51ni/0g==",
|
|
||||||
"requires": {
|
|
||||||
"vscode-languageserver-protocol": "3.7.2",
|
|
||||||
"vscode-uri": "1.0.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vscode-languageserver-protocol": {
|
|
||||||
"version": "3.7.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.7.2.tgz",
|
|
||||||
"integrity": "sha512-VVJwIA/FPl/FnVtrns0FPK6TLi/ET7n1Yo6tCrm6aG7+yAVwIGWdpTmKE+nbP8wEMMbHCkIabk63IJvfz2HNRg==",
|
|
||||||
"requires": {
|
|
||||||
"vscode-jsonrpc": "3.6.2",
|
|
||||||
"vscode-languageserver-types": "3.7.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vscode-languageserver-types": {
|
|
||||||
"version": "3.7.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.7.2.tgz",
|
|
||||||
"integrity": "sha512-L9D2RA+PDS2CiyhLQY5ZrOmyRvXyjc4Ha8s9PqS6mIgGxj00R5Xx2vLKBnAOVfrawJXYZST+2hioMks6SQVU7A=="
|
|
||||||
},
|
|
||||||
"vscode-uri": {
|
|
||||||
"version": "1.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-1.0.3.tgz",
|
|
||||||
"integrity": "sha1-Yxvb9xbcyrDmUpGo3CXCMjIIWlI="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "li18nt",
|
|
||||||
"description": "Style checker for ADF translation files.",
|
|
||||||
"version": "0.0.1",
|
|
||||||
"author": "Alfresco Software",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"engines": {
|
|
||||||
"node": "*"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/Alfresco/alfresco-ng2-components"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"vscode-languageserver": "^4.1.2"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"installServer": "installServerIntoExtension ../client ./package.json ./tsconfig.json",
|
|
||||||
"compile": "installServerIntoExtension ../client ./package.json ./tsconfig.json && tsc -p .",
|
|
||||||
"watch": "installServerIntoExtension ../client ./package.json ./tsconfig.json && tsc -w -p ."
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
var SGStringProblem = /** @class */ (function () {
|
|
||||||
function SGStringProblem(messageCode, lineNum, startCharPos, endCharPos) {
|
|
||||||
this.messageCode = messageCode;
|
|
||||||
this.lineNum = lineNum;
|
|
||||||
this.startCharPos = startCharPos;
|
|
||||||
this.endCharPos = endCharPos;
|
|
||||||
}
|
|
||||||
return SGStringProblem;
|
|
||||||
}());
|
|
||||||
exports.SGStringProblem = SGStringProblem;
|
|
||||||
exports.sgErrorMessages = {
|
|
||||||
'SG0001': 'Polite words are not recommended for UI text',
|
|
||||||
'SG0002': 'Avoid using interjections in UI text ("oops", "yeah", "wow")',
|
|
||||||
'SG0003': 'Avoid exclamations ("!")',
|
|
||||||
'SG0004': 'Avoid unusual punctuation marks (";", "~", "^")',
|
|
||||||
'SG0005': 'Don\'t use the ampersand ("&") as a replacement for "and"',
|
|
||||||
'SG0006': 'Write numbers using digits instead of words',
|
|
||||||
'SG0007': 'Contractions ("can\'t", "won\'t" "isn\'t") are usually better than the equivalent phrase',
|
|
||||||
'SG0008': 'Leave out trademark and copyright symbols',
|
|
||||||
'SG0009': 'Avoid abbreviations for common phrases ("etc", "e.g.")'
|
|
||||||
};
|
|
||||||
exports.rules = [
|
|
||||||
sg0001, sg0002, sg0003, sg0004, sg0005, sg0006, sg0007, sg0008, sg0009
|
|
||||||
];
|
|
||||||
function sg0001(line, lineNum) {
|
|
||||||
// Use global regex to allow repeated searching from the end of the
|
|
||||||
// previous match.
|
|
||||||
var checkWords = /\b(please|thanks|thank you|sorry)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0001");
|
|
||||||
}
|
|
||||||
function sg0002(line, lineNum) {
|
|
||||||
var checkWords = /\b(whoops|oops|wow|yeah|hey|oh|aw)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0002");
|
|
||||||
}
|
|
||||||
function sg0003(line, lineNum) {
|
|
||||||
var checkWords = /!+/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0003");
|
|
||||||
}
|
|
||||||
function sg0004(line, lineNum) {
|
|
||||||
var checkWords = /[;~\^]+/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0004");
|
|
||||||
}
|
|
||||||
function sg0005(line, lineNum) {
|
|
||||||
var checkWords = /&+/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0005");
|
|
||||||
}
|
|
||||||
function sg0006(line, lineNum) {
|
|
||||||
var checkWords = /\b(two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|hundred|thousand)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0006");
|
|
||||||
}
|
|
||||||
function sg0007(line, lineNum) {
|
|
||||||
var checkWords = /\b(cannot|do not|will not|have not|is not|should not|you are|we will)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0007");
|
|
||||||
}
|
|
||||||
function sg0008(line, lineNum) {
|
|
||||||
var checkWords = /[\u00a9\u00ae\u2122]+/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0008");
|
|
||||||
}
|
|
||||||
function sg0009(line, lineNum) {
|
|
||||||
var checkWords = /\b(etc|e\.g\.|eg|i\.e\.|ie|n\.b\.|nb)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0009");
|
|
||||||
}
|
|
||||||
function checkForRegExpMatches(re, line, lineNum, ruleName) {
|
|
||||||
var problems = [];
|
|
||||||
var matchInfo = re.exec(line);
|
|
||||||
while (matchInfo) {
|
|
||||||
problems.push(new SGStringProblem(ruleName, lineNum, matchInfo.index, matchInfo.index + matchInfo[0].length));
|
|
||||||
matchInfo = re.exec(line);
|
|
||||||
}
|
|
||||||
return problems;
|
|
||||||
}
|
|
@ -1,108 +0,0 @@
|
|||||||
|
|
||||||
export class SGStringProblem {
|
|
||||||
constructor(
|
|
||||||
public messageCode: string,
|
|
||||||
public lineNum: number,
|
|
||||||
public startCharPos: number,
|
|
||||||
public endCharPos: number
|
|
||||||
){}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export let sgErrorMessages: {[index: string]: string} = {
|
|
||||||
'SG0001': 'Polite words are not recommended for UI text',
|
|
||||||
'SG0002': 'Avoid using interjections in UI text ("oops", "yeah", "wow")',
|
|
||||||
'SG0003': 'Avoid exclamations ("!")',
|
|
||||||
'SG0004': 'Avoid unusual punctuation marks (";", "~", "^")',
|
|
||||||
'SG0005': 'Don\'t use the ampersand ("&") as a replacement for "and"',
|
|
||||||
'SG0006': 'Write numbers using digits instead of words',
|
|
||||||
'SG0007': 'Contractions ("can\'t", "won\'t" "isn\'t") are usually better than the equivalent phrase',
|
|
||||||
'SG0008': 'Leave out trademark and copyright symbols',
|
|
||||||
'SG0009': 'Avoid abbreviations for common phrases ("etc", "e.g.")'
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
export type SGRule = (line: string, lineNum: number) => SGStringProblem[];
|
|
||||||
|
|
||||||
|
|
||||||
export let rules: SGRule[] = [
|
|
||||||
sg0001, sg0002, sg0003, sg0004, sg0005, sg0006, sg0007, sg0008, sg0009
|
|
||||||
];
|
|
||||||
|
|
||||||
|
|
||||||
function sg0001(line: string, lineNum: number): SGStringProblem[] {
|
|
||||||
// Use global regex to allow repeated searching from the end of the
|
|
||||||
// previous match.
|
|
||||||
let checkWords = /\b(please|thanks|thank you|sorry)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0001");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function sg0002(line: string, lineNum: number): SGStringProblem[] {
|
|
||||||
let checkWords = /\b(whoops|oops|wow|yeah|hey|oh|aw)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0002");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function sg0003(line: string, lineNum: number): SGStringProblem[] {
|
|
||||||
let checkWords = /!+/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0003");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function sg0004(line: string, lineNum: number): SGStringProblem[] {
|
|
||||||
let checkWords = /[;~\^]+/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0004");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function sg0005(line: string, lineNum: number): SGStringProblem[] {
|
|
||||||
let checkWords = /&+/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0005");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function sg0006(line: string, lineNum: number): SGStringProblem[] {
|
|
||||||
let checkWords = /\b(two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|hundred|thousand)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0006");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function sg0007(line: string, lineNum: number): SGStringProblem[] {
|
|
||||||
let checkWords = /\b(cannot|do not|will not|have not|is not|should not|you are|we will)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0007");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function sg0008(line: string, lineNum: number): SGStringProblem[] {
|
|
||||||
let checkWords = /[\u00a9\u00ae\u2122]+/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0008");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function sg0009(line: string, lineNum: number): SGStringProblem[] {
|
|
||||||
let checkWords = /\b(etc|e\.g\.|eg|i\.e\.|ie|n\.b\.|nb)\b/gi;
|
|
||||||
return checkForRegExpMatches(checkWords, line, lineNum, "SG0009");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function checkForRegExpMatches(re: RegExp, line: string, lineNum: number, ruleName: string): SGStringProblem[] {
|
|
||||||
let problems: SGStringProblem[] = [];
|
|
||||||
|
|
||||||
let matchInfo = re.exec(line);
|
|
||||||
|
|
||||||
while (matchInfo) {
|
|
||||||
problems.push(
|
|
||||||
new SGStringProblem(
|
|
||||||
ruleName,
|
|
||||||
lineNum,
|
|
||||||
matchInfo.index,
|
|
||||||
matchInfo.index + matchInfo[0].length
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
matchInfo = re.exec(line);
|
|
||||||
}
|
|
||||||
|
|
||||||
return problems;
|
|
||||||
}
|
|
@ -1,170 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
import {
|
|
||||||
IPCMessageReader, IPCMessageWriter, createConnection, IConnection, TextDocuments, TextDocument,
|
|
||||||
Diagnostic, DiagnosticSeverity, InitializeResult, TextDocumentPositionParams, CompletionItem,
|
|
||||||
CompletionItemKind
|
|
||||||
} from 'vscode-languageserver';
|
|
||||||
|
|
||||||
import {
|
|
||||||
SGStringProblem, sgErrorMessages, rules
|
|
||||||
} from './SGStyleRules';
|
|
||||||
|
|
||||||
// Create a connection for the server. The connection uses Node's IPC as a transport
|
|
||||||
let connection: IConnection = createConnection(new IPCMessageReader(process), new IPCMessageWriter(process));
|
|
||||||
|
|
||||||
// Create a simple text document manager. The text document manager
|
|
||||||
// supports full document sync only
|
|
||||||
let documents: TextDocuments = new TextDocuments();
|
|
||||||
// Make the text document manager listen on the connection
|
|
||||||
// for open, change and close text document events
|
|
||||||
documents.listen(connection);
|
|
||||||
|
|
||||||
|
|
||||||
//let shouldSendDiagnosticRelatedInformation: boolean = false;
|
|
||||||
|
|
||||||
// After the server has started the client sends an initialize request. The server receives
|
|
||||||
// in the passed params the rootPath of the workspace plus the client capabilities.
|
|
||||||
connection.onInitialize((_params): InitializeResult => {
|
|
||||||
//shouldSendDiagnosticRelatedInformation = _params.capabilities && _params.capabilities.textDocument && _params.capabilities.textDocument.publishDiagnostics && _params.capabilities.textDocument.publishDiagnostics.relatedInformation;
|
|
||||||
return {
|
|
||||||
capabilities: {
|
|
||||||
// Tell the client that the server works in FULL text document sync mode
|
|
||||||
textDocumentSync: documents.syncKind,
|
|
||||||
// Tell the client that the server support code complete
|
|
||||||
completionProvider: {
|
|
||||||
resolveProvider: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// The content of a text document has changed. This event is emitted
|
|
||||||
// when the text document first opened or when its content has changed.
|
|
||||||
documents.onDidChangeContent((change) => {
|
|
||||||
if (change.document.uri.endsWith('en.json')) {
|
|
||||||
validateTextDocument(change.document);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// The settings interface describe the server relevant settings part
|
|
||||||
interface Settings {
|
|
||||||
li18nt: ExampleSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
// These are the example settings we defined in the client's package.json
|
|
||||||
// file
|
|
||||||
interface ExampleSettings {
|
|
||||||
maxNumberOfProblems: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
// hold the maxNumberOfProblems setting
|
|
||||||
let maxNumberOfProblems: number;
|
|
||||||
// The settings have changed. Is send on server activation
|
|
||||||
// as well.
|
|
||||||
connection.onDidChangeConfiguration((change) => {
|
|
||||||
let settings = <Settings>change.settings;
|
|
||||||
maxNumberOfProblems = settings.li18nt.maxNumberOfProblems || 100;
|
|
||||||
// Revalidate any open text documents
|
|
||||||
documents.all().forEach(validateTextDocument);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function validateTextDocument(textDocument: TextDocument): void {
|
|
||||||
let diagnostics: Diagnostic[] = [];
|
|
||||||
let messages: SGStringProblem[] = [];
|
|
||||||
|
|
||||||
let lines = textDocument.getText().split(/\r?\n/g);
|
|
||||||
let problems = 0;
|
|
||||||
|
|
||||||
for (var i = 0; i < lines.length && problems < maxNumberOfProblems; i++) {
|
|
||||||
let line = lines[i];
|
|
||||||
|
|
||||||
rules.forEach(rule => {
|
|
||||||
let newProblems = rule(line, i);
|
|
||||||
messages.push(...newProblems);
|
|
||||||
problems += newProblems.length;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
messages.forEach(message => {
|
|
||||||
let errorMessage = sgErrorMessages[message.messageCode] || "No message available";
|
|
||||||
let fullMessageText = `${message.messageCode}: ${errorMessage}`;
|
|
||||||
let diag: Diagnostic = {
|
|
||||||
severity: DiagnosticSeverity.Warning,
|
|
||||||
range: {
|
|
||||||
start: { line: message.lineNum, character: message.startCharPos },
|
|
||||||
end: { line: message.lineNum, character: message.endCharPos }
|
|
||||||
},
|
|
||||||
message: fullMessageText,
|
|
||||||
source: 'li18nt'
|
|
||||||
}
|
|
||||||
|
|
||||||
diagnostics.push(diag);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Send the computed diagnostics to VSCode.
|
|
||||||
connection.sendDiagnostics({ uri: textDocument.uri, diagnostics });
|
|
||||||
}
|
|
||||||
|
|
||||||
connection.onDidChangeWatchedFiles((_change) => {
|
|
||||||
// Monitored files have change in VSCode
|
|
||||||
connection.console.log('We received an file change event');
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// This handler provides the initial list of the completion items.
|
|
||||||
connection.onCompletion((_textDocumentPosition: TextDocumentPositionParams): CompletionItem[] => {
|
|
||||||
// The pass parameter contains the position of the text document in
|
|
||||||
// which code complete got requested. For the example we ignore this
|
|
||||||
// info and always provide the same completion items.
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
label: 'TypeScript',
|
|
||||||
kind: CompletionItemKind.Text,
|
|
||||||
data: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: 'JavaScript',
|
|
||||||
kind: CompletionItemKind.Text,
|
|
||||||
data: 2
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
// This handler resolve additional information for the item selected in
|
|
||||||
// the completion list.
|
|
||||||
connection.onCompletionResolve((item: CompletionItem): CompletionItem => {
|
|
||||||
if (item.data === 1) {
|
|
||||||
item.detail = 'TypeScript details',
|
|
||||||
item.documentation = 'TypeScript documentation'
|
|
||||||
} else if (item.data === 2) {
|
|
||||||
item.detail = 'JavaScript details',
|
|
||||||
item.documentation = 'JavaScript documentation'
|
|
||||||
}
|
|
||||||
return item;
|
|
||||||
});
|
|
||||||
|
|
||||||
/*
|
|
||||||
connection.onDidOpenTextDocument((params) => {
|
|
||||||
// A text document got opened in VSCode.
|
|
||||||
// params.uri uniquely identifies the document. For documents store on disk this is a file URI.
|
|
||||||
// params.text the initial full content of the document.
|
|
||||||
connection.console.log(`${params.textDocument.uri} opened.`);
|
|
||||||
});
|
|
||||||
connection.onDidChangeTextDocument((params) => {
|
|
||||||
// The content of a text document did change in VSCode.
|
|
||||||
// params.uri uniquely identifies the document.
|
|
||||||
// params.contentChanges describe the content changes to the document.
|
|
||||||
connection.console.log(`${params.textDocument.uri} changed: ${JSON.stringify(params.contentChanges)}`);
|
|
||||||
});
|
|
||||||
connection.onDidCloseTextDocument((params) => {
|
|
||||||
// A text document got closed in VSCode.
|
|
||||||
// params.uri uniquely identifies the document.
|
|
||||||
connection.console.log(`${params.textDocument.uri} closed.`);
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Listen on the connection
|
|
||||||
connection.listen();
|
|
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"noUnusedLocals": true,
|
|
||||||
"noUnusedParameters": true,
|
|
||||||
"noImplicitAny": true,
|
|
||||||
"noImplicitReturns": true,
|
|
||||||
"target": "es6",
|
|
||||||
"module": "commonjs",
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"sourceMap": true,
|
|
||||||
"lib" : [ "es2016" ],
|
|
||||||
"outDir": "../client/server"
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
|
18
tools/schematics/adf/.gitignore
vendored
18
tools/schematics/adf/.gitignore
vendored
@ -1,18 +0,0 @@
|
|||||||
# 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
|
|
@ -1,3 +0,0 @@
|
|||||||
# Ignores TypeScript files, but keeps definitions.
|
|
||||||
*.ts
|
|
||||||
!*.d.ts
|
|
@ -1,34 +0,0 @@
|
|||||||
# 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).
|
|
600
tools/schematics/adf/package-lock.json
generated
600
tools/schematics/adf/package-lock.json
generated
@ -1,600 +0,0 @@
|
|||||||
{
|
|
||||||
"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-beta.3",
|
|
||||||
"source-map": "^0.5.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@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-beta.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@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.0.0",
|
|
||||||
"fast-json-stable-stringify": "^2.0.0",
|
|
||||||
"json-schema-traverse": "^0.3.0",
|
|
||||||
"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.1.5",
|
|
||||||
"normalize-path": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.1",
|
|
||||||
"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.0",
|
|
||||||
"async-each": "^1.0.0",
|
|
||||||
"glob-parent": "^2.0.0",
|
|
||||||
"inherits": "^2.0.1",
|
|
||||||
"is-binary-path": "^1.0.0",
|
|
||||||
"is-glob": "^2.0.0",
|
|
||||||
"path-is-absolute": "^1.0.0",
|
|
||||||
"readdirp": "^2.0.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.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.0.0",
|
|
||||||
"randomatic": "^1.1.3",
|
|
||||||
"repeat-element": "^1.1.2",
|
|
||||||
"repeat-string": "^1.5.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.4",
|
|
||||||
"inherits": "2",
|
|
||||||
"minimatch": "^3.0.4",
|
|
||||||
"once": "^1.3.0",
|
|
||||||
"path-is-absolute": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.3.0",
|
|
||||||
"wrappy": "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.0.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.0.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.0.6",
|
|
||||||
"jasmine-core": "~2.99.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.2",
|
|
||||||
"expand-brackets": "^0.1.4",
|
|
||||||
"extglob": "^0.3.1",
|
|
||||||
"filename-regex": "^2.0.0",
|
|
||||||
"is-extglob": "^1.0.0",
|
|
||||||
"is-glob": "^2.0.1",
|
|
||||||
"kind-of": "^3.0.2",
|
|
||||||
"normalize-path": "^2.0.1",
|
|
||||||
"object.omit": "^2.0.0",
|
|
||||||
"parse-glob": "^3.0.4",
|
|
||||||
"regex-cache": "^0.4.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.4",
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.0",
|
|
||||||
"is-extglob": "^1.0.0",
|
|
||||||
"is-glob": "^2.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.0.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.5"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.5"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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.0",
|
|
||||||
"inherits": "~2.0.3",
|
|
||||||
"isarray": "~1.0.0",
|
|
||||||
"process-nextick-args": "~2.0.0",
|
|
||||||
"safe-buffer": "~5.1.1",
|
|
||||||
"string_decoder": "~1.1.1",
|
|
||||||
"util-deprecate": "~1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"readdirp": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
|
|
||||||
"integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=",
|
|
||||||
"requires": {
|
|
||||||
"graceful-fs": "^4.1.2",
|
|
||||||
"minimatch": "^3.0.2",
|
|
||||||
"readable-stream": "^2.0.2",
|
|
||||||
"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.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"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="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
}
|
|
2
tools/schematics/adf/src/adf/index.d.ts
vendored
2
tools/schematics/adf/src/adf/index.d.ts
vendored
@ -1,2 +0,0 @@
|
|||||||
import { Rule } from '@angular-devkit/schematics';
|
|
||||||
export declare function docpage(options: any): Rule;
|
|
@ -1,33 +0,0 @@
|
|||||||
"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
|
|
@ -1 +0,0 @@
|
|||||||
{"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"}
|
|
1
tools/schematics/adf/src/adf/index_spec.d.ts
vendored
1
tools/schematics/adf/src/adf/index_spec.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
export {};
|
|
@ -1,14 +0,0 @@
|
|||||||
"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
|
|
@ -1 +0,0 @@
|
|||||||
{"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"}
|
|
@ -1,34 +0,0 @@
|
|||||||
---
|
|
||||||
Added: v2.4.0
|
|
||||||
Status: Active
|
|
||||||
---
|
|
||||||
|
|
||||||
# <%= displayName + " " + type %>
|
|
||||||
|
|
||||||
One-line description for the index page goes here.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 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)
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"$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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
"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/**/*"
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user