@nuxt/opencollective

WebJar for @nuxt/opencollective

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

nuxt__opencollective
Last Version

Last Version

0.3.2
Release Date

Release Date

Type

Type

jar
Description

Description

@nuxt/opencollective
WebJar for @nuxt/opencollective
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/nuxt-contrib/opencollective

Download nuxt__opencollective

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/nuxt__opencollective/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>nuxt__opencollective</artifactId>
    <version>0.3.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/nuxt__opencollective/
implementation 'org.webjars.npm:nuxt__opencollective:0.3.2'
// https://jarcasting.com/artifacts/org.webjars.npm/nuxt__opencollective/
implementation ("org.webjars.npm:nuxt__opencollective:0.3.2")
'org.webjars.npm:nuxt__opencollective:jar:0.3.2'
<dependency org="org.webjars.npm" name="nuxt__opencollective" rev="0.3.2">
  <artifact name="nuxt__opencollective" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='nuxt__opencollective', version='0.3.2')
)
libraryDependencies += "org.webjars.npm" % "nuxt__opencollective" % "0.3.2"
[org.webjars.npm/nuxt__opencollective "0.3.2"]

Dependencies

compile (3)

Group / Artifact Type Version
org.webjars.npm : chalk jar [4.1.0,5)
org.webjars.npm : consola jar [2.15.0,3)
org.webjars.npm : node-fetch jar [2.6.1,3)

Project Modules

There are no modules declared in this project.

@nuxtjs/opencollective ๐Ÿค Pretty opencollective stats on postinstall!

npm version npm downloads status

Showcase

๐Ÿ“– Release Notes

Features

Displaying opencollective statistics and a donation URL after users install a package is important for many creators. After problems with current packages that offer similar features, we decided to spin off our one own. Our key goals are:

  • No interference/problems when installing packages. Never break installation because of the package
  • Pretty output for all information
  • Decent configurability
  • Seamless drop-in for common solutions

Setup

  • Add @nuxtjs/opencollective dependency using yarn or npm to your project
  • Add the script to postinstall in your package.json
{
  // ...
  "scripts": {
    "postinstall": "opencollective || exit 0"
  },
  "collective": {
    "url": "https://opencollective.com/nuxtjs"
  }
  // ...
}
  • Configure it

Configuration

Configuration is applied through your project's package.json.

A full configuration looks like:

{
  "collective": {
    "url": "https://opencollective.com/nuxtjs",
    "logoUrl": "https://opencollective.com/nuxtjs/logo.txt?reverse=true&variant=variant2",
    "donation": {
      "slug": "/order/591",
      "amount": "50",
      "text": "Please donate:"
    }
  }
}

Attribute Optional Default Comment
url โŒ - The URL to your opencollective page
logo โœ… - LEGACY: The URL to the logo that should be displayed. Please use logoUrl instead.
logoUrl โœ… - The URL to the ASCII-logo that should be displayed.
donation.slug โœ… '/donate' The slug that should be appended to url. Can be used to setup a specific order.
donation.amount โœ… - The default amount that should be selected on the opencollective page.
donation.text โœ… 'Donate:' The text that will be displayed before your donation url.

Disable message

We know the postinstall messages can be annoying when deploying in production or running a CI pipeline. That's why the message is disabled in those environments by default.

Enabled when one the following environment variables is set:

  • NODE_ENV=dev
  • NODE_ENV=development
  • OPENCOLLECTIVE_FORCE

Strictly Disabled when one the following environment variables is set:

  • OC_POSTINSTALL_TEST
  • OPENCOLLECTIVE_HIDE
  • CI
  • CONTINUOUS_INTEGRATION
  • NODE_ENV (set and not dev or development)
  • DISABLE_OPENCOLLECTIVE (set to any string value that is not 'false' or '0', for compatability with opencollective-postinatall)

Development

  • Clone this repository
  • Install dependencies using yarn install or npm install
  • Run it manually path/to/project/root/src/index.js path/to/package/you/want/to/try
  • Run tests with npm t or yarn test

Inspiration

This project is heavily inspired by opencollective-cli.

License

MIT License MIT. Made with ๐Ÿ’–

org.webjars.npm

Nuxt Contributions

Nuxt Team contributions to the Node.js ecosystem.

Versions

Version
0.3.2
0.3.0
0.2.2
0.2.1