@moonlightos/moonlight-hard
v1.0.3
Published
A way for open source developers to get paid
Downloads
6
Maintainers
Readme
Moonlight Hard
To configure Moonlight hard, follow a few simple steps:
- Install moonlight-hard with npm
npm install --save --production @moonlightos/moonlight-hard
The production flag will make sure that development dependencies do not get installed, as they are not needed. This will keep the size of the moonlight package small.
- Configure moonlight hard with a preinstall script for your package.
{
"name": "your package name",
"version": "1.0.0",
"description": "your description",
"main": "index.js",
"scripts": {
"preinstall": "node -e 'try {require(\"@moonlightos/moonlight-hard\").showAd(\"moonlightos/moonlight-easy-example\", [sandbox])} catch (e) {}'",
}
}
Replace [sandbox] with true if you want to use the sandbox, false otherwise. The 'sandbox' option is a way to get around ad blockers, by opening the ad in a tiny (45KB/89KB only) browser. The sandbox mode is optional, but beware that your earnings might be lower without the sandbox option, due to the widespread use of AdBlockers.
Replace your package full name in the format github_account/repository. For example, for this package it would be 'MoonlightOS/moonlight-easy'
- Watch the money come in.
The dashboard
You can log in to the Moonlight dashboard with your GitHub account. If you have no repositories with Moonlight configured, it will show your repositories without any impression data. Once you configure Moonlight, impression & earnings data will start showing up in the Moonlight dashboard.