ts-quick-docs
Advanced tools
Comparing version 0.4.0 to 0.5.0
{ | ||
"name": "ts-quick-docs", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "quick TypeScript documentation extractor", | ||
"bin": "index.js", | ||
"main": "index.js", | ||
"bin": "dist/index.js", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"dependencies": { | ||
"typescript": ">=2.0.0" | ||
"typescript": "2.1" | ||
}, | ||
"devDependencies": { | ||
"@types/chai": "3.4.34", | ||
"@types/mocha": "2.2.39", | ||
"@types/node": "7.0.5", | ||
"@types/react": "15.0.6", | ||
"chai": "3.5.0", | ||
"mocha": "2.4.5" | ||
"mocha": "2.4.5", | ||
"ts-node": "2.0.0", | ||
"tslint": "4.4.2" | ||
}, | ||
"scripts": { | ||
"all": "npm run clean && npm run compile && npm run mocha", | ||
"clean": "rm -rf {.,src,test}/*.{js,d.ts}", | ||
"all": "npm run clean && npm run compile && npm run test", | ||
"clean": "rm -rf dist", | ||
"compile": "tsc --project .", | ||
"prepublish": "npm run clean && npm run compile", | ||
"test": "mocha" | ||
"lint": "tslint src/**/*.ts test/**/*.ts", | ||
"test": "mocha --compilers ts:ts-node/register" | ||
}, | ||
"author": "", | ||
"license": "ISC" | ||
"author": "Gilad Gray <giladgray@gmail.com>", | ||
"license": "Apache-2.0" | ||
} |
@@ -5,10 +5,6 @@ # ts-quick-docs ![NPM](https://img.shields.io/npm/v/ts-quick-docs.svg) ![Circle CI](https://img.shields.io/circleci/project/giladgray/ts-quick-docs.svg) | ||
This little tool parses a TypeScript project and spits out a big list of documentation objects for each `interface` and `const` discovered. That data file can be used to generate human-friendly documentation in any desired format. | ||
This little tool parses a **TypeScript 2.1** project and spits out a big list of documentation | ||
objects for each `interface` and `const` discovered. That data file can be used to generate | ||
human-friendly documentation in any desired format. | ||
## Installation | ||
1. Install Node + npm | ||
1. Install [typings]() | ||
1. `npm install && typings install` | ||
## Usage | ||
@@ -21,2 +17,4 @@ | ||
_Note: options are not supported from the CLI._ | ||
#### Node API | ||
@@ -45,3 +43,4 @@ | ||
_Note that `files` must be an array but it can contain just the entry file if it imports others. A dummy TS program is created internally so we'll walk that tree for you._ | ||
_Note that `files` must be an array but it can contain just the entry file if it imports others._ | ||
A dummy TS program is created internally so we'll walk that tree for you. | ||
@@ -52,15 +51,21 @@ ## Options | ||
Array of patterns that will be matched against each entity's `name`. Matching entities will be excluded from the output. | ||
Array of patterns that will be matched against each entity's `name`. Matching entities will be | ||
excluded from the output. | ||
#### excludePaths: `(string | RegExp)[]` | ||
Array of patterns that will be matched against each file's path. Matching files _will be_ parsed but entities in those files _will not_ appear in the output. | ||
Array of patterns that will be matched against each file's path. Matching files _will be_ parsed but | ||
entities in those files _will not_ appear in the output. | ||
#### ignoreDefinitions: `boolean = false` | ||
#### includeDefinitionFiles: `boolean = false` | ||
Whether to exclude `.d.ts` files from the generated documentation blob. | ||
Useful to ignore imported environment libraries, like `node.d.ts`. | ||
Whether to include symbols from `.d.ts` files in the generated documentation blob. These files are | ||
excluded from the output by default because they tend to produce a lot of noise: do you really need | ||
every symbol from `@types/node.d.ts`?? | ||
#### includeBasicTypeProperties: `boolean = false` | ||
Whether built-in properties for basic types should appear in the output (such as `String.prototype.toString`). Basic types include boolean, number, string, and arrays of those three. Defaults to `false` because these properties tend to pollute output for no benefit. | ||
Whether built-in properties for basic types should appear in the output (such as | ||
`String.prototype.toString`). Basic types include `boolean`, `number`, `string`, arrays of those | ||
three, string literals, and numeric literlas. Defaults to `false` because these properties tend to | ||
pollute output for no benefit. |
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"target": "es6", | ||
"module": "commonjs", | ||
@@ -16,13 +16,8 @@ "moduleResolution": "node", | ||
"preserveConstEnums": true, | ||
"suppressImplicitAnyIndexErrors": true | ||
"suppressImplicitAnyIndexErrors": true, | ||
"outDir": "dist" | ||
}, | ||
"exclude": [ | ||
"node_modules", | ||
"typings/globals" | ||
], | ||
"compileOnSave": true, | ||
"buildOnSave": false, | ||
"atom": { | ||
"rewriteTsconfig": false | ||
} | ||
"include": [ | ||
"src" | ||
] | ||
} |
104
tslint.json
{ | ||
"extends": [ | ||
"tslint:latest" | ||
], | ||
"rules": { | ||
"align": [true, | ||
"parameters", | ||
"statements" | ||
], | ||
"class-name": true, | ||
"comment-format": [true, | ||
"check-space" | ||
], | ||
"curly": true, | ||
"eofline": true, | ||
"forin": true, | ||
"indent": [true, "spaces"], | ||
"interface-name": true, | ||
"jsdoc-format": true, | ||
"label-position": true, | ||
"label-undefined": true, | ||
"max-line-length": [true, 120], | ||
"member-access": true, | ||
"member-ordering": [true, | ||
"public-before-private", | ||
"static-before-instance", | ||
"variables-before-functions" | ||
], | ||
"no-arg": true, | ||
"no-bitwise": false, | ||
"no-conditional-assignment": true, | ||
"no-console": [true, | ||
"debug", | ||
"info", | ||
"log", | ||
"time", | ||
"timeEnd", | ||
"trace" | ||
], | ||
"no-construct": true, | ||
"no-constructor-vars": true, | ||
"no-debugger": true, | ||
"no-duplicate-key": true, | ||
"no-duplicate-variable": true, | ||
"no-empty": true, | ||
"no-eval": true, | ||
"no-internal-module": true, | ||
"no-require-imports": true, | ||
"no-shadowed-variable": true, | ||
"no-string-literal": true, | ||
"no-switch-case-fall-through": true, | ||
"no-trailing-whitespace": true, | ||
"no-unreachable": true, | ||
"no-unused-expression": true, | ||
"no-unused-variable": [true, "react"], | ||
"no-use-before-declare": true, | ||
"no-var-keyword": true, | ||
"object-literal-sort-keys": true, | ||
"one-line": [true, | ||
"check-catch", | ||
"check-else", | ||
"check-finally", | ||
"check-open-brace", | ||
"check-whitespace" | ||
], | ||
"quotemark": [true, "double"], | ||
"radix": true, | ||
"semicolon": true, | ||
"switch-default": true, | ||
"trailing-comma": [true, | ||
{ | ||
"singleline": "never", | ||
"multiline": "always" | ||
} | ||
], | ||
"triple-equals": [true, "allow-null-check"], | ||
"typedef-whitespace": [true, | ||
{ | ||
"call-signature": "nospace", | ||
"index-signature": "nospace", | ||
"parameter": "nospace", | ||
"property-declaration": "nospace", | ||
"variable-declaration": "nospace" | ||
}, { | ||
"call-signature": "onespace", | ||
"index-signature": "onespace", | ||
"parameter": "onespace", | ||
"property-declaration": "onespace", | ||
"variable-declaration": "onespace" | ||
} | ||
], | ||
"variable-name": [true, | ||
"check-format", | ||
"ban-keywords" | ||
], | ||
"whitespace": [true, | ||
"check-branch", | ||
"check-decl", | ||
"check-operator", | ||
"check-separator", | ||
"check-type" | ||
"ban": [ | ||
true, | ||
[ "Object", "assign", "use TS2.1 object spread { ...a, ...b }" ], | ||
[ "describe", "only" ], | ||
[ "it", "only" ] | ||
] | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
50494
16
2
68
8
273
1
+ Addedtypescript@2.1.6(transitive)
- Removedtypescript@5.7.3(transitive)
Updatedtypescript@2.1