From 1b81ee3dc3b1059b6b2515ba1e60e6d66b8c28ef Mon Sep 17 00:00:00 2001 From: AK Date: Tue, 1 Mar 2022 00:17:13 -0500 Subject: [PATCH] quick fix for npx --- README.md | 8 +++++++- package.json | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c82d875..2772c35 100644 --- a/README.md +++ b/README.md @@ -38,12 +38,18 @@ read more about [`credentials`](#credentials), [`data`](#data), and [`options`]( ### stand-alone usage clone the module: ``` -git clone https://github.com/ak--47/mixpanel-import.git +$ git clone https://github.com/ak--47/mixpanel-import.git ``` run it and providing a path to the data you wish to import: ``` $ node index.js ./pathToData ``` + +alternatively: +``` +$ npx mixpanel-import ./pathToData +``` + when running stand-alone, `pathToData` can be a `.json`, `.jsonl`, `.ndjson`, or `.txt` file OR a directory which contains said files. you will also need a [`.env` configuration file](#environment-variables) diff --git a/package.json b/package.json index cc724d3..409ef41 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,14 @@ "main": "index.js", "scripts": { "dev": "nodemon --ignore ./testData scratch.js", + "publish": "npm publish", "import": "node index.js", "generate": "NUMEVENTS=100000 SINCEDAYS=30 node generateFakeData.js", "prune": "rm -rf ./testData/*" }, + "bin": { + "mixpanel-import": "./index.js" + }, "repository": { "type": "git", "url": "git+https://github.com/ak--47/mixpanel-import"