How to use the write-pkg function in write-pkg

To help you get started, we’ve selected a few write-pkg 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 vladshcherbin / rollup-plugin-generate-package-json / src / index.js View on Github external
async function writePackageJson(folder, contents) {
  try {
    return await writePackage(folder, contents, { indent: 2 })
  } catch (e) {
    throw new Error('Unable to save generated package.json file, check "outputFolder" option')
  }
}
github project-flogo / flogo-web / tools / release / post-build-apps.js View on Github external
async function updatePkgJson(from, to) {
  const pkgJson = await readPkg({ cwd: from });
  pkgJson.version = process.env.FLOGO_LIB_VERSION || `dev-${pkgJson.version}`;
  await writePkg(to, pkgJson);
}
github elastic / kibana / packages / kbn-pm / src / utils / package_json.ts View on Github external
export function writePackageJson(path: string, json: IPackageJson) {
  return writePkg(path, json);
}

write-pkg

Write a package.json file

MIT
Latest version published 6 months ago

Package Health Score

56 / 100
Full package analysis