How to use corvid-dir-as-json - 4 common examples

To help you get started, we’ve selected a few corvid-dir-as-json 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 wix-incubator / corvid / packages / corvid-local-test-utils / src / localSiteDir.js View on Github external
const initBackup = (rootPath, localSiteFiles) =>
  dirAsJson.writeJsonToDir(
    path.join(rootPath, ".corvid", "backup"),
    localSiteFiles
  );
github wix-incubator / corvid / packages / corvid-local-test-utils / src / initTempDir.js View on Github external
const initTempDir = async files => {
  const tempLocalSitePath = await makeTempDir("test-site");
  if (files) {
    await dirAsJson.writeJsonToDir(tempLocalSitePath, files);
  }
  return tempLocalSitePath;
};
github wix-incubator / corvid / packages / corvid-local-test-utils / src / localSiteDir.js View on Github external
const initLocalSite = async (localSiteFiles, createdRoodDir) => {
  const rootDir = createdRoodDir || (await initTempDir());

  const corvidRcPath = path.join(rootDir, ".corvid", "corvidrc.json");
  await fs.ensureFile(corvidRcPath);
  await fs.writeFile(corvidRcPath, JSON.stringify({ metasiteId: 12345 }));

  await dirAsJson.writeJsonToDir(siteSrcPath(rootDir), localSiteFiles);
  return rootDir;
};
github wix-incubator / corvid / packages / corvid-local-site / src / readWrite.js View on Github external
const listFilesRecursive = async siteRootPath =>
  Object.keys(
    await readDirToJson(siteRootPath, {
      delimiter: "/",
      readFiles: false,
      onlyFiles: true
    })
  );

corvid-dir-as-json

MIT
Latest version published 3 years ago

Package Health Score

49 / 100
Full package analysis

Similar packages