Files
openstapps/README.md
2018-12-04 16:28:30 +01:00

45 lines
2.3 KiB
Markdown

# @openstapps/configuration
[![pipeline status](https://img.shields.io/gitlab/pipeline/openstapps/configuration.svg?style=flat-square)](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://www.gnu.org/licenses/gpl-3.0.en.html)
[![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.
Install it as a dev dependency in your project and it will automatically add a script in your `package.json` to execute it.
```shell
npm install --save-dev @openstapps/configuration
npm run check-configuration
```
You can also install it globally and use it as a cli.
```shell
npm install -g @openstapps/configuration
openstapps-configuration --help
```
## Checked files
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.
## Copied files
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.
| 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`.
A script called `check-configuration` will be added to your `package.json` to execute the configuration script manually again.