How to use @electron-forge/template-base - 1 common examples

To help you get started, we’ve selected a few @electron-forge/template-base examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electron-userland / electron-forge / packages / api / core / src / api / import.ts View on Github external
d('installing devDependencies');
    await installDepList(dir, importDevDeps, DepType.DEV);

    d('installing exactDevDependencies');
    await installDepList(dir, importExactDevDeps, DepType.DEV, DepVersionRestriction.EXACT);
  });

  packageJSON = await readRawPackageJson(dir);

  if (!packageJSON.version) {
    warn(interactive, 'Please set the "version" in your application\'s package.json'.yellow);
  }

  packageJSON.config = packageJSON.config || {};
  const templatePackageJSON = await readRawPackageJson(baseTemplate.templateDir);
  if (packageJSON.config.forge) {
    if (typeof packageJSON.config.forge !== 'string') {
      packageJSON.config.forge = _merge(templatePackageJSON.config.forge, packageJSON.config.forge);
    }
  } else {
    packageJSON.config.forge = templatePackageJSON.config.forge;
  }

  if (typeof packageJSON.config.forge !== 'string') {
    setInitialForgeConfig(packageJSON);
  }

  await writeChanges();

  await asyncOra('Fixing .gitignore', async () => {
    if (await fs.pathExists(path.resolve(dir, '.gitignore'))) {

@electron-forge/template-base

Base template for Electron Forge

MIT
Latest version published 24 days ago

Package Health Score

86 / 100
Full package analysis

Popular @electron-forge/template-base functions

Similar packages