How to use the @electron-forge/template-base.templateDir function in @electron-forge/template-base

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 2 months ago

Package Health Score

89 / 100
Full package analysis

Popular @electron-forge/template-base functions