⭐ Thanc: a smarty way to thank NPM packages authors by starring their repos
Thanks to @julietjul for thanc's logo
thanc: a smarty way to thank the authors of NPM packages by starring their repos on Github :heart:
With thanc you'll thank every dependency and sub-dependency (literally the whole dependencies tree) of a given project provided with a package.json
(or better a package-lock.json
) manifest.
So yes, it works also with yarn
😺
This is what thanc looks like:
and then, after too many repos:
Inspired by:
Basically, because the thank (and also thanks) package already exists on NPM registry.
Thanc (or thancian) is the ancient english word to say thank, so that's why :bowtie:
thanc can be installed locally, globally or used with npx.
If you've NPM 5.2+, then you can go ahead with npx:
$ npx thanc --me
$ npm i -D thanc
Then, under the scripts section of your package.json
:
"thanc": "thanc ."
And then:
$ npm run thanc
$ npm i -g thanc
Then:
$ thanc
Thanking current folder:
$ thanc
Thanking an online Github repo:
$ thanc https://github.com/wilk/thanc
Thanking a specific folder:
$ thanc myProject
Thanking the thanc
project:
$ thanc --me
Thanking without seeing the repos list but a progress bar instead:
$ thanc --quite .
Basic Auth
$ thanc -u <your_github_username> -p <your_github_password> .
User Token
Explicit:
$ thanc -t <your_github_token> .
Via GITHUB_TOKEN
env var:
$ export GITHUB_TOKEN=<your_github_token>; thanc .
thanc supports two types of authentication:
public_repo
permission)thanc has several options you can check through --help
:
$ thanc --help
Usage: thanc [options] <project_path>
Options:
-V, --version output the version number
--me thank thanc package and all of its dependencies
-u, --username <username> your Github username
-p, --password <password> your Github password
-t, --token <password> your Github token
-q, --quite Show only the progress bar instead of the repos list
-h, --help output usage information
thanc is published as a transpiled lib and so, for each new tag, a new build is performed, generating the dist.js
file.
To verify if dist.js
is exactly the transpiled version of thanc, a md5
checksum has been provided (and always up-to-date) inside the package.json (checksums
):
$ md5sum dist.js
The result must be equal to checksums listed inside the package.json
.
The build verification process can be done as follows:
$ git clone https://github.com/wilk/thanc
$ cd thanc
$ npm i
$ npm run build
# replace md5sum with your favourite md5 program
$ md5sum dist.js
Github APIs have some limitations:
Some repos cannot be starred, due to:
Sometimes, some repos can be starred twice because they might have a very similar url but different, pointing to the same github repo