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)