From 9c7cbb8c1ab2ee586552ab742dd333636c0310e7 Mon Sep 17 00:00:00 2001 From: SaraDScarf Date: Fri, 22 Nov 2024 11:52:46 -0600 Subject: [PATCH 1/2] Update README.md Additional updates to the messaging for scarf.sh --- README.md | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index aa9a07d..600385a 100644 --- a/README.md +++ b/README.md @@ -15,31 +15,28 @@ To read more about why we wrote this library, check out [this post](https://gith ### Features -- No dependencies. -- Fully transparent to the user. Scarf will log its behavior to the console - during installation. It will never silently report analytics for someone that - hasn't explictly given permission to do so. +- No dependencies, making Scarf.js more transparent, performant, maintainable, and secure. +- Fully transparent to the user. Scarf will log the package's behavior in the Scarf Dashboard. It will never silently report analytics for someone that hasn't explictly given permission to do so. - Never interrupts your package installation. Reporting is done on a best effort basis. ### Installing -You'll first need to create a library entry on [Scarf](https://scarf.sh). Once -created, add a dependency on this library to your own: +You'll first need to configure your npm package in [Scarf](https://scarf.sh). ```bash npm i --save @scarf/scarf ``` -Once your library is published to npm with this change, Scarf will automatically +Once your npm package is published with Scarf, it will automatically start to collect stats on install, no additional code is required! Head to your package's dashboard on Scarf to see your reports when available. ### Configuring -Users of your package will be opted in by default and can opt out by setting the +By default, users of your package will be opted in and can opt out by setting the `SCARF_ANALYTICS=false` environment variable. If you'd like Scarf analytics to -instead be opt-in, you can set this by adding an entry to your `package.json` +instead be opt-out by default, you can set this by adding an entry to your `package.json` ```json5 @@ -54,13 +51,12 @@ instead be opt-in, you can set this by adding an entry to your `package.json` } ``` -Scarf will now be opt-out by default, and users can set `SCARF_ANALYTICS=true` +In constrast, Scarf will now be opt out by default, and users can set `SCARF_ANALYTICS=true` to opt in. -Regardless of the default state, Scarf will log what it is doing to users who -haven't explictly opted in or out. +Without having set either true or false, and instead SCARF_ANALYTICS is set to null, Scarf will log what those users are doing. -By default, scarf-js will only trigger analytics when your package is installed as a dependency of another package, or is being installed globally. This ensures that scarf-js analytics will not be triggered on `npm install` being run _within your project_. To change this, you can add: +By default, scarf-js will only trigger analytics when your Scarf package is installed as a dependency of another package, or is being installed globally. This ensures that scarf-js analytics will not be triggered on `npm install` being run _within your project_. To change this, you can add: ```json5 // your-package/package.json From e68e7014397d8e02d0277802c0df51374ad90ac2 Mon Sep 17 00:00:00 2001 From: SaraDScarf Date: Mon, 2 Dec 2024 10:48:47 -0600 Subject: [PATCH 2/2] Update README.md reverted change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 600385a..6950466 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ instead be opt-out by default, you can set this by adding an entry to your `pack In constrast, Scarf will now be opt out by default, and users can set `SCARF_ANALYTICS=true` to opt in. -Without having set either true or false, and instead SCARF_ANALYTICS is set to null, Scarf will log what those users are doing. +Regardless of the default state, Scarf will log what it is doing to users who haven't explictly opted in or out. By default, scarf-js will only trigger analytics when your Scarf package is installed as a dependency of another package, or is being installed globally. This ensures that scarf-js analytics will not be triggered on `npm install` being run _within your project_. To change this, you can add: