From ffe2bda937fe37f247942b14396aceff68907e17 Mon Sep 17 00:00:00 2001 From: Karl-Philipp Wulfert Date: Tue, 4 Dec 2018 14:11:38 +0100 Subject: [PATCH] docs: update readme --- README.md | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 97a02473..971ff7b0 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,39 @@ # @openstapps/configuration +[![pipeline status](https://gitlab.com/openstapps/configuration/badges/master/pipeline.svg)](https://gitlab.com/openstapps/configuration/commits/master) +[![npm](https://img.shields.io/npm/v/@openstapps/configuration.svg?style=flat-square)](https://npmjs.com/package/@openstapps/configuration) +[![license)](https://img.shields.io/npm/l/@openstapps/configuration.svg?style=flat-square)](https://npmjs.com/package/@openstapps/configuration) +[![documentation](https://img.shields.io/badge/documentation-online-blue.svg?style=flat-square)](https://openstapps.gitlab.io/configuration) + A collection of configuration base files for StApps projects. ```shell npm install --save-dev @openstapps/configuration ``` -## `.editorconfig` +You can also install it globally and use it as a cli. -This file is automatically copied to your project's root directory upon installation of this package. It tells your editor/IDE about basic settings for indentation and formatting. - -## `tsconfig.json` - -Create a `tsconfig.json` with the following content: - -```json -{ - "extends": "./node_modules/@openstapps/configuration/tsconfig.json" -} +```shell +npm install -g @openstapps/configuration +openstapps-configuration --help ``` -[Extend/adjust the configuration](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) only exceptionally. +## Checked files -## `tslint.json` +If your project's root contains a `tsconfig.json` or a `tslint.json` they will be checked if they contain the extension of the default configurations. -Create a `tslint.json` with the following content: +## Copied files -```json -{ - "extends": "./node_modules/@openstapps/configuration/tslint.json" -} -``` +The following files are automatically copied to your project's root directory if they do not exist yet. Use `-r, --replace` to replace existing files. -[Extend/adjust the configuration](https://palantir.github.io/tslint/usage/configuration/) only exceptionally. +| File | Purpose | +| --- | --- | +| `.editorconfig` | Configuration for your editor/IDE about basic settings for indentation and formatting | +| `.gitignore` | Configuration for Git about which files to ignore from versioning | +| `.npmignore` | Configuration for NPM about which files to exclude from packaging | +| `tsconfig.json` | Configuration for [TypeScript compiler](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) | +| `tslint.json` | Configuration for [TSLint](https://palantir.github.io/tslint/usage/configuration/) | + +## Adjusted files + +Your project's `package.json` will be examined to determine whether or not you have `nyc` installed in your `devDependencies`. If it is installed the recommended configuration for `nyc` will be added to/updated in your `package.json`.