This commit is contained in:
Pete Gonzalez 2019-11-15 00:06:08 -08:00
Родитель c1726fae9b
Коммит 140a67d3f7
11 изменённых файлов: 199 добавлений и 2 удалений

Просмотреть файл

@ -6,7 +6,7 @@
"license": "MIT",
"dependencies": {
"@microsoft/tsdoc": "0.12.15",
"@types/node": "10.7.1",
"@types/node": "10.17.5",
"colors": "~1.3.3"
},
"devDependencies": {

Просмотреть файл

@ -32,7 +32,7 @@
"@rushstack/eslint-config": "0.4.0",
"@types/eslint": "6.1.3",
"@types/estree": "0.0.39",
"@types/node": "10.7.1",
"@types/node": "10.17.5",
"eslint": "^6.0.0",
"rimraf": "~2.6.3",
"typescript": "~3.5.3"

Просмотреть файл

@ -376,6 +376,11 @@
"projectFolder": "tsdoc",
"shouldPublish": true
},
{
"packageName": "@microsoft/tsdoc-config",
"projectFolder": "tsdoc-config",
"shouldPublish": false
},
{
"packageName": "eslint-plugin-tsdoc",
"projectFolder": "eslint-plugin",

Просмотреть файл

@ -0,0 +1,7 @@
// This is a workaround for https://github.com/eslint/eslint/issues/3458
require("@rushstack/eslint-config/patch-eslint6");
module.exports = {
extends: [ "@rushstack/eslint-config" ],
parserOptions: { tsconfigRootDir: __dirname },
};

25
tsdoc-config/.npmignore Normal file
Просмотреть файл

@ -0,0 +1,25 @@
# Ignore everything by default
**
# Use negative patterns to bring back the specific things we want to publish
!/bin/**
!/lib/**
!/dist/**
!ThirdPartyNotice.txt
# Ignore certain files in the above folder
/dist/*.stats.*
/lib/**/test/*
/lib/**/__tests__/*
# NOTE: These don't need to be specified, because NPM includes them automatically.
#
# package.json
# README (and its variants)
# CHANGELOG (and its variants)
# LICENSE / LICENCE
## Project specific definitions
# -----------------------------
# (Add your exceptions here)

2
tsdoc-config/.npmrc Normal file
Просмотреть файл

@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
always-auth=false

Просмотреть файл

@ -0,0 +1,6 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"printWidth": 120,
"tabWidth": 2,
"singleQuote": true
}

22
tsdoc-config/LICENSE Normal file
Просмотреть файл

@ -0,0 +1,22 @@
Copyright (c) Microsoft Corporation. All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

37
tsdoc-config/build.js Normal file
Просмотреть файл

@ -0,0 +1,37 @@
'use strict';
const child_process = require('child_process');
const path = require('path');
const production = process.argv.indexOf('--production') >= 0;
const baseDir = __dirname;
process.chdir(baseDir);
process.exitCode = 1;
try {
child_process.execSync(path.join(baseDir, 'node_modules/.bin/rimraf')
+ ' ./lib/', { stdio: 'inherit' });
console.log('-- TYPESCRIPT --\n');
child_process.execSync(path.join(baseDir, 'node_modules/.bin/tsc'), { stdio: 'inherit' });
console.log('-- ESLINT --\n');
child_process.execSync(path.join(baseDir, 'node_modules/.bin/eslint')
+ ' -f unix \"src/**/*.{ts,tsx}\"',
{ stdio: 'inherit' });
if (production) {
console.log('-- JEST --\n');
// Map stderr-->stdout because Jest weirdly writes to stderr during a successful run,
// which the build tools (rightly so) interpret as an issue that should fail the build
child_process.execSync(path.join(baseDir, 'node_modules/.bin/jest'), {
stdio: [ 0, 1, 1 ]
});
}
process.exitCode = 0;
} catch (e) {
console.log('ERROR: ' + e.message);
}

58
tsdoc-config/package.json Normal file
Просмотреть файл

@ -0,0 +1,58 @@
{
"name": "@microsoft/tsdoc-config",
"version": "0.12.15",
"description": "A loader for the tsdoc-config.json file",
"keywords": [
"TypeScript",
"documentation",
"doc",
"comments",
"JSDoc",
"parser",
"standard"
],
"repository": {
"type": "git",
"url": "https://github.com/Microsoft/tsdoc"
},
"homepage": "https://github.com/Microsoft/tsdoc",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"license": "MIT",
"dependencies": {
"ajv": "~6.10.2",
"resolve": "~1.12.0"
},
"devDependencies": {
"@rushstack/eslint-config": "0.4.0",
"@types/jest": "24.0.16",
"@types/resolve": "0.0.8",
"@types/node": "10.17.5",
"eslint": "^6.0.0",
"jest": "~24.8.0",
"prettier": "~1.18.2",
"rimraf": "~2.6.3",
"ts-jest": "~24.0.2",
"typescript": "~3.5.3"
},
"scripts": {
"build": "node ./build.js",
"test": "jest",
"watch": "jest --watch",
"lint": "eslint -f unix \"src/**/*.{ts,tsx}\""
},
"jest": {
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testMatch": [
"<rootDir>/src/**/*.test.ts"
]
}
}

Просмотреть файл

@ -0,0 +1,35 @@
{
"$schema": "http://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "es5",
"forceConsistentCasingInFileNames": true,
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"experimentalDecorators": true,
"types": [
"jest"
],
"lib": [
"es5",
"scripthost",
"es2015.collection",
"es2015.promise",
"es2015.iterable"
],
"noImplicitAny": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"outDir": "lib"
},
"include": [
"src/**/*.ts"
]
}