-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update repository links, and improve the readme (#282)
- Loading branch information
1 parent
9f31f0f
commit c91deb8
Showing
3 changed files
with
34 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,33 @@ | ||
# gts - Google TypeScript style | ||
# gts | ||
> Google TypeScript Style | ||
[![NPM Version][npm-image]][npm-url] | ||
[![CircleCI][circle-image]][circle-url] | ||
[![Dependency Status][david-image]][david-url] | ||
[![devDependency Status][david-dev-image]][david-dev-url] | ||
[![Known Vulnerabilities][snyk-image]][snyk-url] | ||
[![codecov][codecov-image]][codecov-url] | ||
[![TypeScript Style Guide][gts-image]][gts-url] | ||
|
||
**NOTE: THIS README refers to the master branch which corresponds to the upcoming 1.0 release. To view documentation for the currently released version of this module see: https://github.com/google/gts/tree/v0.9.x.** | ||
|
||
[gts][npm-url] is Google's TypeScript style guide, and the configuration for our formatter, linter, and automatic code fixer. No lint rules to edit, no configuration to update, no more bike shedding over syntax. To borrow from [standardjs][standardjs-url]: | ||
[gts][npm-url] is Google's TypeScript style guide, and the configuration for our formatter, linter, and automatic code fixer. No lint rules to edit, no configuration to update, no more bike shedding over syntax. | ||
|
||
To borrow from [standardjs][standardjs-url]: | ||
- **No configuration**. The easiest way to enforce consistent style in your project. Just drop it in. | ||
- **Automatically format code**. Just run `gts fix` and say goodbye to messy or inconsistent code. | ||
- **Catch style issues & programmer errors early**. Save precious code review time by eliminating back-and-forth between reviewer & contributor. | ||
- **Opinionated, but not to a fault**. We recommend you use the default configuration, but if you *need* to customize compiler or linter config, you can. | ||
|
||
Under the covers, we use [tslint][tslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code. | ||
|
||
Made with ❤️ by the Google Node.js team. | ||
|
||
# Getting Started | ||
## Getting Started | ||
|
||
If you're already using [email protected]+ (bundled with Node 8.3+), run: | ||
The easiest way to get started is to run: | ||
```sh | ||
npx gts init | ||
``` | ||
|
||
Still on an older version of npm? We got ya! In a directory with your `package.json` run: | ||
|
||
```sh | ||
npm install --save-dev gts [email protected] | ||
$(npm bin)/gts init | ||
``` | ||
|
||
# How it works | ||
## How it works | ||
When you run the `npx gts init` command, it's going to do a few things for you: | ||
- Adds an opinionated `tsconfig.json` file to your project that uses the Google TypeScript Style. | ||
- Adds the necessary devDependencies to your `package.json`. | ||
|
@@ -45,7 +38,7 @@ When you run the `npx gts init` command, it's going to do a few things for you: | |
- `compile`: Compiles the source code using TypeScript compiler. | ||
- `pretest`, `posttest` and `prepare`: convenience integrations. | ||
|
||
## Individual files | ||
### Individual files | ||
The commands above will all run in the scope of the current folder. Some commands can be run on individual files: | ||
|
||
```sh | ||
|
@@ -54,23 +47,35 @@ gts check one.ts two.ts three.ts | |
gts check *.ts | ||
``` | ||
|
||
# License | ||
See [LICENSE](LICENSE) | ||
## Badge | ||
Show your love for `gts` and include a badge! | ||
|
||
[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts) | ||
|
||
```md | ||
[![Code Style: Google](https://img.shields.io/badge/code%20style-google-blueviolet.svg)](https://github.com/google/gts) | ||
``` | ||
|
||
## License | ||
[Apache-2.0](LICENSE) | ||
|
||
--- | ||
Made with ❤️ by the Google Node.js team. | ||
|
||
> ***NOTE: This is not an official Google product.*** | ||
[circle-image]: https://circleci.com/gh/google/gts.svg?style=svg | ||
[circle-image]: https://circleci.com/gh/google/gts.svg?style=shield | ||
[circle-url]: https://circleci.com/gh/google/gts | ||
[prettier-url]: https://prettier.io/ | ||
[codecov-image]: https://codecov.io/gh/google/ts-style/branch/master/graph/badge.svg | ||
[codecov-url]: https://codecov.io/gh/google/ts-style | ||
[david-dev-image]: https://david-dm.org/google/ts-style/dev-status.svg | ||
[david-dev-url]: https://david-dm.org/google/ts-style?type=dev | ||
[david-image]: https://david-dm.org/google/ts-style.svg | ||
[david-url]: https://david-dm.org/google/ts-style | ||
[codecov-image]: https://codecov.io/gh/google/gts/branch/master/graph/badge.svg | ||
[codecov-url]: https://codecov.io/gh/google/gts | ||
[david-image]: https://david-dm.org/google/gts.svg | ||
[david-url]: https://david-dm.org/google/gts | ||
[gts-image]: https://img.shields.io/badge/code%20style-google-blueviolet.svg | ||
[gts-url]: https://github.com/google/gts | ||
[npm-image]: https://img.shields.io/npm/v/gts.svg | ||
[npm-url]: https://npmjs.org/package/gts | ||
[snyk-image]: https://snyk.io/test/github/google/ts-style/badge.svg | ||
[snyk-url]: https://snyk.io/test/github/google/ts-style | ||
[snyk-image]: https://snyk.io/test/github/google/gts/badge.svg | ||
[snyk-url]: https://snyk.io/test/github/google/gts | ||
[standardjs-url]: https://www.npmjs.com/package/standard | ||
[tslint-url]: https://palantir.github.io/tslint/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters