Initial skeleton for @microsoft/tsdoc package (#18)

* Initial skeleton for @microsoft/tsdoc package

* Add travis scripts

* Delete accidentally added files

* Add an appropriate .gitignore

* PR feedback

* Spurious NPM diff
This commit is contained in:
Pete Gonzalez 2018-05-24 19:03:19 -07:00 коммит произвёл GitHub
Родитель 33052cd99a
Коммит 3f36ed9ee5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
11 изменённых файлов: 6055 добавлений и 303 удалений

343
.gitignore поставляемый
Просмотреть файл

@ -1,288 +1,67 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# Windows OS Files
$RECYCLE.BIN/
Desktop.ini
Thumbs.db
ehthumbs.db
# User-specific files
# Mac OSX Files
.AppleDouble
.DS_Store
.LSOverride
.Spotlight-V100
.Trashes
._*
# Package files
app
app-min
bower_components
coverage
local
dist
jspm_packages
lib
lib-amd
lib-es6
node_modules
npm-debug.log
npminstall-log.txt
temp
# Rush files
**/*.build.error.log
**/*.build.log
/common/apiDocs/json/**
/common/last-install.flag
/common/last-install.log
/common/local-npm
/common/local-npm/**
/common/local-rush
/common/local-rush/**
/common/npm-cache
/common/npm-cache/**
/common/npm-local
/common/npm-local/**
/common/npm-tmp
/common/npm-tmp/**
/common/rush-link.json
/common/rush-recycler
package-deps.json
# IDE files
*.bak
*.csproj.user
*.sublime-project
*.sublime-workspace
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.idea
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
/.settings/
bin/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# Ignore VS Code personal settings, but keep a root-level setting
/*/**/.vscode/
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Typescript v1 declaration files
typings/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# Build artifacts
**/*.scss.ts

15
.travis.yml Normal file
Просмотреть файл

@ -0,0 +1,15 @@
language: node_js
node_js:
- '8.9.4'
script:
- set -e
- echo 'git fetch' && echo -en 'travis_fold:start:fetch\\r'
- git fetch origin master:refs/remotes/origin/master -a
- echo -en 'travis_fold:end:fetch\\r'
- echo 'npm install' && echo -en 'travis_fold:start:install\\r'
- cd tsdoc
- npm install
- echo -en 'travis_fold:end:install\\r'
- echo 'npm run build' && echo -en 'travis_fold:start:build\\r'
- npm run build
- echo -en 'travis_fold:end:build\\r'

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

@ -1,21 +0,0 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
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

22
tsdoc/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.

30
tsdoc/README.md Normal file
Просмотреть файл

@ -0,0 +1,30 @@
# @microsoft/tsdoc
This library is the reference implementation of a parser for the TSDoc syntax. Using this library is an easy way to ensure that your tool is 100% compatible with the standard.
### What is TSDoc?
**TSDoc** is a proposal to standardize the doc comments used in [TypeScript](http://www.typescriptlang.org/) source files. It allows different tools to extract content from comments without getting confused by each other's syntax. The **TSDoc** notation looks pretty familiar:
```typescript
/**
* Adds two numbers together.
*
* @remarks
* This method is part of the {@link core-libary/Math | Math subsystem}.
*
* @param x - The first number to add
* @param y - The second number to add
* @returns The sum of `x` and `y`
*
* @beta
*/
function add(x: number, y: number): number;
```
## Get involved
The **TSDoc** project is under active development and evolving. For up to date documentation and other background, please visit the project site:
https://github.com/Microsoft/tsdoc

5719
tsdoc/package-lock.json сгенерированный Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -0,0 +1,51 @@
{
"name": "@microsoft/tsdoc",
"version": "0.1.0",
"description": "A parser for the TypeScript doc comment syntax",
"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": {},
"devDependencies": {
"@types/jest": "~22.2.3",
"jest": "~23.0.0",
"ts-jest": "~22.4.6",
"rimraf": "~2.6.2",
"tslint": "~5.10.0",
"tslint-microsoft-contrib": "~5.0.3",
"typescript": "~2.8.3"
},
"scripts": {
"build": "rimraf ./lib/ && tsc && tslint --config tslint.json --project . --rules-dir node_modules/tslint-microsoft-contrib",
"test": "jest",
"start": "jest --watch"
},
"jest": {
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx"
],
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testMatch": [
"<rootDir>/src/**/*.test.ts"
]
}
}

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

@ -0,0 +1,4 @@
it('Example unit test', () => {
expect(1 + 1).toBe(2);
});

1
tsdoc/src/index.ts Normal file
Просмотреть файл

@ -0,0 +1 @@
console.log('Hello, world!');

29
tsdoc/tsconfig.json Normal file
Просмотреть файл

@ -0,0 +1,29 @@
{
"$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",
"dom"
],
"strictNullChecks": true,
"outDir": "lib"
},
"include": [
"src/**/*.ts"
]
}

123
tsdoc/tslint.json Normal file
Просмотреть файл

@ -0,0 +1,123 @@
{
"$schema": "http://json.schemastore.org/tslint",
"rules": {
"class-name": true,
"comment-format": [true, "check-space"],
"curly": true,
"eofline": false,
"export-name": true,
"forin": true,
"indent": [true, "spaces", 2],
"interface-name": true,
"label-position": true,
"max-line-length": [true, 120],
"member-access": true,
"member-ordering": [
true,
{
"order": [
"public-static-field",
"protected-static-field",
"private-static-field",
"public-instance-field",
"protected-instance-field",
"private-instance-field",
"public-static-method",
"protected-static-method",
"private-static-method",
"public-constructor",
"public-instance-method",
"protected-constructor",
"protected-instance-method",
"private-constructor",
"private-instance-method"
]
}
],
"missing-optional-annotation": true,
"no-arg": true,
"no-any": true,
"no-bitwise": true,
"no-consecutive-blank-lines": true,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-constant-condition": true,
"no-construct": true,
"no-debugger": true,
"no-duplicate-switch-case": true,
"no-duplicate-parameter-names": true,
"no-duplicate-variable": true,
"no-empty": true,
"no-eval": true,
"no-function-expression": true,
"no-inferrable-types": false,
"no-internal-module": true,
"no-null-keyword": true,
"no-shadowed-variable": true,
"no-string-literal": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unnecessary-semicolons": true,
"no-unused-expression": true,
"no-unused-variable": true,
"no-use-before-declare": true,
"no-with-statement": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"quotemark": [true, "single", "avoid-escape"],
"prefer-const": true,
"radix": true,
"semicolon": true,
"trailing-comma": [
true,
{
"multiline": "never",
"singleline": "never"
}
],
"triple-equals": [true, "allow-null-check"],
"typedef": [
true,
"call-signature",
"parameter",
"property-declaration",
"variable-declaration",
"member-variable-declaration"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"use-isnan": true,
"use-named-parameter": true,
"variable-name": [true, "check-format", "allow-leading-underscore", "ban-keywords"],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
]
}
}