@ascendcom/electron-modules

[config example format] PARAMETER=VALUE

Usage no npm install needed!

<script type="module">
  import ascendcomElectronModules from 'https://cdn.skypack.dev/@ascendcom/electron-modules';
</script>

README

. clone this project to your pc/mac

. cd in to the project

. npm link

. go to the project you want to use it

. npm link ae-electron-modules

. require('ae-electron-modules') in your entry file (in electron is called renderer.js)

. magic happens

[config example format] PARAMETER=VALUE

[in application] config('PARAMETER', default_value) will return "VALUE"

[in entry file] let { debugTool, configTool, downloadSync, analyticSync, } = require('ae-electron-modules');

let ds = new downloadSync(); let ct = new configTool(); let dt = new debugTool(); let as = new analyticSync();

[get local config folder path] ct.path

. Test downloadSync

electron module with a mocking server for testing the download sync. A very simple one.

in the ae-electron-modules directory run

node dummyApi

then the api will be localhost:3000/version (for the downloadSync set up) and if you want to see what happen if data updated, you can use a browser to open localhost:3000/update and data will get updated