Skip to content

Commit

Permalink
docs: update repository links, and improve the readme (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith authored Feb 25, 2019
1 parent 9f31f0f commit c91deb8
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 29 deletions.
59 changes: 32 additions & 27 deletions README.md
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`.
Expand All @@ -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
Expand All @@ -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/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gts",
"version": "0.9.0",
"description": "Google TypeScript Style",
"repository": "google/ts-style",
"repository": "google/gts",
"main": "build/src/index.js",
"bin": {
"gts": "build/src/cli.js"
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function run(verb: string, files: string[]): Promise<boolean> {
};
// Linting/formatting depend on typescript. We don't want to load the
// typescript module during init, since it might not exist.
// See: https://github.com/google/ts-style/issues/48
// See: https://github.com/google/gts/issues/48
if (verb === 'init') {
return init(options);
}
Expand Down

0 comments on commit c91deb8

Please sign in to comment.