opencollective-postinstall
Advanced tools
Comparing version 1.1.1 to 2.0.0
{ | ||
"name": "opencollective-postinstall", | ||
"version": "1.1.1", | ||
"description": "Prompt users to donate after they install your node module with npm install", | ||
"version": "2.0.0", | ||
"description": "Lightweight npm postinstall message to invite people to donate to your collective", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/opencollective/opencollective-postinstall.git" | ||
"url": "git+https://github.com/opencollective/npm-postinstall.git" | ||
}, | ||
"scripts": { | ||
"test": "mocha test", | ||
"postinstall": "node bin/setup.js" | ||
}, | ||
"bin": { | ||
"opencollective-postinstall": "./bin/opencollective-postinstall" | ||
}, | ||
"bin": "index.js", | ||
"keywords": [ | ||
"opencollective", | ||
"donate", | ||
"donation", | ||
"fundoss", | ||
"npm" | ||
"funding", | ||
"sustain" | ||
], | ||
"author": "Xavier Damman <@xdamman>", | ||
"author": "Xavier Damman (@xdamman)", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/opencollective/node-module/issues" | ||
"url": "https://github.com/opencollective/npm-postinstall/issues" | ||
}, | ||
"homepage": "https://github.com/opencollective/node-module#readme", | ||
"dependencies": { | ||
"chalk": "1.1.3", | ||
"node-fetch": "1.6.3", | ||
"inquirer": "^3.0.6" | ||
}, | ||
"devDependencies": { | ||
"chai": "3.5.0", | ||
"cross-env": "^4.0.0", | ||
"mocha": "3.2.0" | ||
} | ||
"homepage": "https://github.com/opencollective/npm-postinstall#readme" | ||
} |
@@ -1,75 +0,25 @@ | ||
# opencollective-postinstall | ||
Prompt your users to donate to your collective after `npm install` | ||
# npm-postinstall | ||
Lightweight npm postinstall message to invite people to donate to your collective | ||
![](https://cl.ly/0u2a0z0Y3X37/Screen%20Shot%202017-03-24%20at%202.37.46%20PM.png) | ||
## Installation | ||
You can also add your ASCII art logo: | ||
![](https://cl.ly/3u182e3B0323/Screen%20Shot%202017-03-14%20at%2010.51.21%20AM.png) | ||
``` | ||
npm install --save opencollective-postinstall | ||
``` | ||
## Install | ||
And in your `package.json` add: | ||
npm install opencollective-postinstall --save-dev | ||
```json | ||
{ | ||
... | ||
"scripts": { | ||
"postinstall": "opencollective-postinstall" | ||
}, | ||
"collective": { | ||
"url": "https://opencollective.com/webpack" | ||
} | ||
... | ||
} | ||
``` | ||
This will run an interactive cli to configure your package.json | ||
Note: because you are adding this in your `devDependencies`, it will only be installed in development enviromnent. | ||
![](https://cl.ly/2k0G1C461A09/Screen%20Shot%202017-03-14%20at%2010.53.36%20AM.png) | ||
In your `package.json`, it will add a new `"collective"` attribute and update the postinstall script. | ||
{ | ||
... | ||
"collective": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/yourcollective_slug", // e.g. https://opencollective.com/webpack | ||
"logo": "https://opencollective.com/webpack/logo.txt?variant=wide&width=26" | ||
}, | ||
"scripts": { | ||
"postinstall": "./node_modules/.bin/opencollective-postinstall || exit 0" | ||
}, | ||
... | ||
} | ||
**Why `|| exit 0` in `scripts.postinstall`?**<br /> | ||
Since we are adding the dependency in `devDependencies`, the script `./node_modules/.bin/opencollective-postinstall` won't be installed in production. Therefore, the `postinstall` script will return an error and will interrupt the `npm install` process. Adding `|| exit 0` makes sure that this `postinstall` script always returns true. | ||
## Options | ||
### Customize the ASCII art logo of your collective | ||
You can play with different sizes and variants to get the perfect ASCII art for your collective: | ||
https://opencollective.com/:slug/logo.txt?variant=:string&width=:integer&reverse=:boolean | ||
e.g. https://opencollective.com/webpack/logo.txt?variant=wide&width=26&reverse=false | ||
Possible values for `variant`: `wide`, `ultra-wide`, `variant1`, `variant2`, `variant3`, `variant4`, `blocks`, `bits`, `binary`, `greyscale`, `solid` | ||
You can also change `reverse` to `true`. | ||
### Suggest a donation amount | ||
You can specify a suggested donation amount or a different URL to use for your logo in ascii. | ||
In the "collective" section of your `package.json`, add: | ||
{ | ||
... | ||
"collective": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/yourcollective_slug", // e.g. https://opencollective.com/webpack | ||
"logo": "https://opencollective.com/yourcollective_slug/logo.txt" // e.g. https://opencollective.com/webpack/logo.txt | ||
"suggested_donation": { | ||
"amount": 2, | ||
"currency": "USD", // must be same currency than your collective's default currency | ||
"interval": "monthly" // or "one-time" or "yearly" | ||
} | ||
} | ||
} | ||
## Questions? Comments? Feedback? | ||
Join the #opensource channel on our slack: https://slack.opencollective.org | ||
Note: This is a lightweight alternative to the [opencollective-cli](https://github.com/opencollective/opencollective-cli) that offers a more complete postinstall message with the current balance and ASCII logo of the collective. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 10 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
0
0
0
0
1
2
2782
4
6
25
- Removedchalk@1.1.3
- Removedinquirer@^3.0.6
- Removednode-fetch@1.6.3
- Removedansi-escapes@3.2.0(transitive)
- Removedansi-regex@2.1.13.0.1(transitive)
- Removedansi-styles@2.2.13.2.1(transitive)
- Removedchalk@1.1.32.4.2(transitive)
- Removedchardet@0.4.2(transitive)
- Removedcli-cursor@2.1.0(transitive)
- Removedcli-width@2.2.1(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedencoding@0.1.13(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedexternal-editor@2.2.0(transitive)
- Removedfigures@2.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removediconv-lite@0.4.240.6.3(transitive)
- Removedinquirer@3.3.0(transitive)
- Removedis-fullwidth-code-point@2.0.0(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmimic-fn@1.2.0(transitive)
- Removedmute-stream@0.0.7(transitive)
- Removednode-fetch@1.6.3(transitive)
- Removedonetime@2.0.1(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedrestore-cursor@2.0.0(transitive)
- Removedrun-async@2.4.1(transitive)
- Removedrx-lite@4.0.8(transitive)
- Removedrx-lite-aggregates@4.0.8(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstring-width@2.1.1(transitive)
- Removedstrip-ansi@3.0.14.0.0(transitive)
- Removedsupports-color@2.0.05.5.0(transitive)
- Removedthrough@2.3.8(transitive)
- Removedtmp@0.0.33(transitive)