Skip to content

Commit

Permalink
Merge branch 'master' into pr/742
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Oct 28, 2018
2 parents 2cf1f5f + 0faf3a5 commit 34b7a4c
Show file tree
Hide file tree
Showing 173 changed files with 4,099 additions and 2,681 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
@@ -0,0 +1,11 @@
# https://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
# Disable core.autocrlf's line ending conversion behavior to prevent test failures on Windows
* text=auto eol=lf
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,6 +4,7 @@
.baseDir.js
.baseDir.ts
yarn.lock
yarn-error.log

/src/typings/typescript/typescript.js

Expand Down
18 changes: 17 additions & 1 deletion .travis.yml
@@ -1,5 +1,21 @@
sudo: false
language: node_js

node_js:
- 6
- 4
- 10


before_install:
- npm install --global npm@
before_install: >
node_version=$(node -v);
if [ ${node_version:1:1} = 6 ]; then
npm install --global npm@^4
else
npm install --global npm@latest
fi
script:
- npm test
- npm run lint
8 changes: 5 additions & 3 deletions .vscode/launch.json
Expand Up @@ -7,17 +7,19 @@
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"name": "Debug Tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"cwd": "${workspaceRoot}",
"args": [
"--no-timeouts"
"--no-timeouts",
"dist/test/**/*.js"
],
"outFiles": [
"${workspaceRoot}/lib/**/*.js",
"${workspaceRoot}/test/**/*.js"
],
"preLaunchTask": "build",
"sourceMaps": true
}
]
}
}
32 changes: 22 additions & 10 deletions .vscode/tasks.json
@@ -1,11 +1,23 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "tsc",
"isShellCommand": true,
"args": ["-w", "-p", "."],
"showOutput": "silent",
"isWatching": true,
"problemMatcher": "$tsc-watch"
}
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "npm run grunt -- default",
"problemMatcher": [
"$tsc"
]
},
{
"label": "build_and_test",
"type": "shell",
"command": "npm run grunt -- build_and_test",
"problemMatcher": [
"$tsc"
]
}
]
}
118 changes: 118 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,118 @@
# Contributing to TypeDoc

Thanks for taking the time to contribute! TypeDoc is a volunteer-run project and we couldn't do it without your help.

This document includes a set of guidelines for contributing to TypeDoc. These are guidelines, not rules. If something seems off, please feel free to propose changes to this document in a pull request.

## Table of Contents

1. [How Can I Contribute?](#how-can-i-contribute)
- [Bug Reports](#bug-reports)
- [Suggestions](#suggestions)
- [Code](#code)
1. [Setup - Git, GitHub, and Node](#setup---git-github-and-node)
1. [Linting, Building, and Testing](#linting-building-and-testing)
1. [Pull Requests](#pull-requests)
1. [Updating Your Branch](#updating-your-branch)


## How Can I Contribute?

### Bug Reports

This section guides you through submitting a bug report for TypeDoc. Following these guidelines helps others understand your report and resolve the issue.

Before creating a bug report please check [this list][bugs] list to see if it has already been reported. If the issue is closed, please open a new issue and link to the original issue.

When creating a bug report, explain the problem and include as much additional information as necessary to help maintainers reproduce it. Ideally, provide an example project which highlights the problem.

- **Use a clear and descriptive title** for the issue to identify the problem
- **Describe your project setup**. The easier it is for maintainers to reproduce your problem, the more likely it is to be fixed quickly.
- **Explain what you expected to see instead and why**

### Suggestions

This section guides you through submitting an enhancement suggestion for Typedoc.

Before creating a feature request, please check [this list][suggestions] to see if it has already been requested.

When creating an enhancement request, explain your use case and ultimate goal. This will make it possible for contributors to suggest existing alternatives which may already meet your requirements.

- **Use a clear and descriptive title** for the issue to identify the suggestion.
- **Provide an example where this enhancement would improve TypeDoc**
- **If possible, list another documentation generator where this feature exists**

### Code

Unsure of where to begin contributing to TypeDoc? You can start by looking through the issues labeled [good-first-issue] and [help-wanted]. Issues labeled with [good-first-issue] should only require changing a few lines of code and a test or two. Issues labeled with [help-wanted] can be considerably more involved and may require changing multiple files.

For instructions on setting up your environment, see the [setup](#setup---git-github-and-node) instructions in this document.

If you have started work on an issue and get stuck or want a second opinion on your implementation feel free to reach out through [Gitter].

## Setup - Git, GitHub, and Node

If you don't already have [Git] installed, install it first. You will need it to contribute to TypeDoc. You will also need to install [Node]. TypeDoc requires at least npm 4, so if you are running Node 7.3.0 or older you will need to upgrade npm using `npm install --global npm@^4`.

#### Installation

1. Fork the TypeDoc repository - https://github.com/TypeStrong/typedoc/fork
1. Open a terminal, or "Git Bash" on Windows.
1. Use `cd` to move to the directory that you want to work in.
1. Clone your repository, replace USER with your GitHub username:
```bash
git clone https://github.com/USER/typedoc
```
1. Add the TypeDoc repo as a remote repository
```bash
git remote add typedoc https://github.com/TypeStrong/typedoc
```
1. Install dependencies and build the latest version:
```bash
npm install
```
1. Open the typedoc folder in your favorite editor. If you don't have one, try [Visual Studio Code][VSCode] or [Atom]

## Linting, Building, and Testing

Once you have cloned TypeDoc, you can lint, build, and test the code from your terminal.

#### Linting

To lint the TypeDoc code, run `npm run lint`. This will start tslint and check all files for stylistic problems. You can also install a tslint plugin for your editor to show most style problems as you type.

You can automatically fix some style problems by running `npm run lint -- --fix`.

#### Building

To compile the TypeDoc source, run `npm run grunt`. This will start the TypeScript compiler and output the compiled JavaScript to the `dist` folder. If you want to build and test in one step, run `npm run build`.

#### Testing

TypeDoc includes an extensive set of tests that describe its output. To validate any changes you have made, build the project and then run `npm test`. Alternatively, to rebuild with your changes and then immediately test, run `npm run build`.

If you have changed the TypeDoc output, it will cause tests to fail. Once you have validated that the introduced changes were intended, run `npm run grunt -- update-specs` to update the spec files for the new output.

## Pull Requests

Once you have finished working on an issue, you can submit a pull request to have your changes merged into the TypeDoc repository and included in the next release.

Before submitting a pull request, make sure that there are no linting problems (`npm run lint`), all tests pass (`npm test`), and your branch is up to date. Its also a good idea to join the TypeDoc [Gitter] room to discuss how best to implement changes.

Please do not change the project version number in a pull request.

## Updating Your Branch

If the TypeDoc repository has changed since you originally forked it, you will need to update your repository with the latest changes before submitting a pull request. To pull the latest changes from the TypeDoc repo, run `git pull typedoc master`.

[bugs]: https://github.com/TypeStrong/typedoc/labels/bug
[suggestions]: https://github.com/TypeStrong/typedoc/labels/enhancement
[good-first-issue]: https://github.com/TypeStrong/typedoc/labels/good%20first%20issue
[help-wanted]: https://github.com/TypeStrong/typedoc/labels/help%20wanted

[Gitter]: https://gitter.im/TypeStrong/typedoc
[GitHub]: https://github.com
[Git]: https://git-scm.com
[Node]: https://nodejs.org/en/
[VSCode]: https://code.visualstudio.com/
[Atom]: https://atom.io/
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -5,7 +5,6 @@
[![Build Status](https://travis-ci.org/TypeStrong/typedoc.svg?branch=master)](https://travis-ci.org/TypeStrong/typedoc)
[![NPM Version](https://badge.fury.io/js/typedoc.svg)](http://badge.fury.io/js/typedoc)
[![Chat on Gitter](https://badges.gitter.im/TypeStrong/typedoc.svg)](https://gitter.im/TypeStrong/typedoc?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Greenkeeper Enabled](https://badges.greenkeeper.io/TypeStrong/typedoc.svg)](https://greenkeeper.io/)

## Installation

Expand Down Expand Up @@ -77,7 +76,7 @@ in order to change the behaviour of TypeDoc.
Specify ECMAScript target version: "ES3" (default), "ES5" or "ES6"
* `--tsconfig <path/to/tsconfig.json>`<br>
Specify a typescript config file that should be loaded. If not specified TypeDoc will look for 'tsconfig.json' in the current directory.

#### Theming
* `--theme <default|minimal|path/to/theme>`<br>
Specify the path to the theme that should be used.
Expand Down Expand Up @@ -137,6 +136,7 @@ There is a plugin available to run TypeDoc with Grunt created by Bart van der Sc
* [Sourcefile URL](https://github.com/gdelmas/typedoc-plugin-sourcefile-url) - Set custom source file URL links
* [Internal/External Module](https://github.com/christopherthielen/typedoc-plugin-internal-external) - Explicitly mark modules as `@internal` or `@external`
* [Single Line Tags](https://github.com/christopherthielen/typedoc-plugin-single-line-tags) - Process certain `@tags` as single lines
* [Localization](https://github.com/IgniteUI/typedoc-plugin-localization) - Generate documentation for different languages

## Advanced guides and docs

Expand All @@ -150,6 +150,8 @@ This project is maintained by a community of developers. Contributions are welco
You can find TypeDoc on GitHub; feel free to start an issue or create a pull requests:<br>
[https://github.com/TypeStrong/typedoc](https://github.com/TypeStrong/typedoc)

For more information, read the [contribution guide](https://github.com/TypeStrong/typedoc/contributing.md).


## License

Expand Down
28 changes: 28 additions & 0 deletions examples/basic/README.md
@@ -0,0 +1,28 @@
# Example

> Example Documentation
## Installation

Example install

```bash
$ npm install examples --save-dev
```

Example executable: ``examples``.

## Usage

### Shell

Example usage.

```bash
$ examples --out path/to/documentation/ path/to/example/project/
```

### Arguments

* `--example <project>`<br>
Example explanation.
9 changes: 5 additions & 4 deletions gruntfile.js
Expand Up @@ -105,11 +105,12 @@ module.exports = function(grunt)
grunt.loadNpmTasks('grunt-tslint');
grunt.loadNpmTasks('grunt-mocha-istanbul');

grunt.registerTask('default', ['tslint', 'ts:typedoc', 'string-replace:version']);
grunt.registerTask('build_and_test', ['default', 'specs', 'copy', 'mocha_istanbul:coverage']);
grunt.registerTask('specs', ['clean:specsBefore', 'build-specs', 'clean:specsAfter']);
grunt.registerTask('default', ['ts:typedoc', 'string-replace:version']);
grunt.registerTask('test', ['tslint', 'copy', 'mocha_istanbul:coverage']);
grunt.registerTask('build_and_test', ['default', 'test']);
grunt.registerTask('specs', ['clean:specsBefore', 'update-specs', 'clean:specsAfter']);

grunt.registerTask('build-specs', function() {
grunt.registerTask('update-specs', function() {
var FS = require('fs-extra');
var Path = require('path');
var TypeDoc = require('./');
Expand Down

0 comments on commit 34b7a4c

Please sign in to comment.