From a0f26701095e9d0d897476a114522ae7f42e8dbb Mon Sep 17 00:00:00 2001 From: Nate Goldman Date: Sun, 25 Jun 2017 22:09:08 -0700 Subject: [PATCH] add clear script --- package.json | 3 ++- scripts/clear.js | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 scripts/clear.js diff --git a/package.json b/package.json index cc0f8e3..e8fdcaf 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,8 @@ "test:renderer": "tape renderer/**/test.js | tap-format-spec", "rebuild": "electron-rebuild", "build": "build --dir", - "dist": "build" + "dist": "build", + "clear": "electron scripts/clear.js" }, "build": { "appId": "com.hypermodules.hyperamp", diff --git a/scripts/clear.js b/scripts/clear.js new file mode 100755 index 0000000..da1de91 --- /dev/null +++ b/scripts/clear.js @@ -0,0 +1,14 @@ +#!/usr/bin/env electron + +var Store = require('electron-store') + +var config = new Store({ name: 'hyperamp-config' }) +var persist = new Store({ name: 'hyperamp-persist' }) + +console.log('clearing %s', config.path) +config.clear() + +console.log('clearing %s', persist.path) +persist.clear() + +process.exit(0)