UNPKG

2.56 kBMarkdownView Raw
1<div align="center">
2 <h1>🛠 gd-scripts 📦</h1>
3 <p>CLI toolbox for common scripts for my projects, <strike>copied</strike> inspired from <a href="https://github.com/kentcdodds/kcd-scripts">kcd-scripts</a>.</p>
4</div>
5
6<p align="center">
7 <a href="https://travis-ci.org/GabrielDuarteM/gd-scripts">
8 <img src="https://img.shields.io/travis/GabrielDuarteM/gd-scripts/master.svg" alt="Travis branch">
9 </a>
10 <a href="http://makeapullrequest.com">
11 <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome">
12 </a>
13 <a href="https://www.npmjs.com/package/gd-scripts">
14 <img src="https://img.shields.io/npm/dw/gd-scripts.svg" alt="npm downloads">
15 </a>
16</p>
17
18## Introduction
19
20This is a CLI that abstracts away all configuration for my open source projects
21for linting, testing, building, and more.
22
23## Installation
24
25npm:
26
27```
28npm install --save-dev gd-scripts
29```
30
31yarn:
32
33```
34yarn add -D gd-scripts
35```
36
37## Usage
38
39This is a CLI and exposes a bin called `gd-scripts`. I don't really plan on
40documenting or testing it super duper well because it's really specific to my
41needs. You'll find all available scripts in `src/scripts`.
42
43This project actually dogfoods itself. If you look in the `package.json`, you'll
44find scripts with `ts-node src {scriptName}`. This serves as an example of some
45of the things you can do with `gd-scripts`.
46
47### Overriding Config
48
49Unlike `react-scripts`, `gd-scripts` allows you to specify your own
50configuration for things and have that plug directly into the way things work
51with `gd-scripts`. There are various ways that it works, but basically if you
52want to have your own config for something, just add the configuration and
53`gd-scripts` will use that instead of it's own internal config. In addition,
54`gd-scripts` exposes its configuration so you can use it and override only
55the parts of the config you need to.
56
57This can be a very helpful way to make editor integration work for tools like
58ESLint which require project-based ESLint configuration to be present to work.
59
60So, if we were to do this for ESLint, you could create an `.eslintrc.js` with the
61contents of:
62
63```
64module.exports = require("gd-scripts/eslint")
65```
66
67> Note: `gd-scripts` intentionally does not merge things for you when you start
68> configuring things to make it less magical and more straightforward. Extending
69> can take place on your terms. I think this is actually a great way to do this.
70
71## Inspiration
72
73This is inspired by `kcd-scripts`, which is heavy inspired by `react-scripts`. 🤷
74
75## LICENSE
76
77MIT