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 |
|
20 | This is a CLI that abstracts away all configuration for my open source projects
|
21 | for linting, testing, building, and more.
|
22 |
|
23 | ## Installation
|
24 |
|
25 | npm:
|
26 |
|
27 | ```
|
28 | npm install --save-dev gd-scripts
|
29 | ```
|
30 |
|
31 | yarn:
|
32 |
|
33 | ```
|
34 | yarn add -D gd-scripts
|
35 | ```
|
36 |
|
37 | ## Usage
|
38 |
|
39 | This is a CLI and exposes a bin called `gd-scripts`. I don't really plan on
|
40 | documenting or testing it super duper well because it's really specific to my
|
41 | needs. You'll find all available scripts in `src/scripts`.
|
42 |
|
43 | This project actually dogfoods itself. If you look in the `package.json`, you'll
|
44 | find scripts with `ts-node src {scriptName}`. This serves as an example of some
|
45 | of the things you can do with `gd-scripts`.
|
46 |
|
47 | ### Overriding Config
|
48 |
|
49 | Unlike `react-scripts`, `gd-scripts` allows you to specify your own
|
50 | configuration for things and have that plug directly into the way things work
|
51 | with `gd-scripts`. There are various ways that it works, but basically if you
|
52 | want 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
|
55 | the parts of the config you need to.
|
56 |
|
57 | This can be a very helpful way to make editor integration work for tools like
|
58 | ESLint which require project-based ESLint configuration to be present to work.
|
59 |
|
60 | So, if we were to do this for ESLint, you could create an `.eslintrc.js` with the
|
61 | contents of:
|
62 |
|
63 | ```
|
64 | module.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 |
|
73 | This is inspired by `kcd-scripts`, which is heavy inspired by `react-scripts`. 🤷
|
74 |
|
75 | ## LICENSE
|
76 |
|
77 | MIT
|