Skip to content

getstation/electron-package-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

electron-package-manager

Dynamically install and require modules in electron

Usage

import epm from 'electron-package-manager';

const CWD = '/tmp/test-plugins';
const PACKAGE = 'levelup';

epm
  .pack(PACKAGE, CWD)
  .then(packagename => epm.extract(PACKAGE, CWD, path.join(CWD, packagename)))
  .then(modulepath => {
    console.log('requiring', modulepath);
    const mylib = require(modulepath);
    console.log('required', mylib);
  });

About

Dynamically install and require modules in electron

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published