How to use the @beemo/core.Path function in @beemo/core

To help you get started, we’ve selected a few @beemo/core 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 airbnb / nimbus / packages / config-webpack / src / helpers.ts View on Github external
.forEach(modulePath => {
      const packageName = modulePath.split('/node_modules/')[1];
      const esLessName = packageName.replace(/-es$/, '');
      const esPath = new Path(modulePath, 'es');
      const esmPath = new Path(modulePath, 'esm');

      // airbnb-foo/lib -> airbnb-foo/esm
      // optimal/lib -> optimal/esm
      if (esPath.exists() || esmPath.exists()) {
        const aliasPath = esPath.exists() ? `${packageName}/es` : `${packageName}/esm`;
        const aliased = buildTargets.some(targetFolder => {
          if (new Path(modulePath, targetFolder).exists()) {
            aliases[`${packageName}/${targetFolder}`] = aliasPath;

            return true;
          }

          return false;
        });
github beemojs / beemo / packages / driver-typescript / src / TypeScriptDriver.ts View on Github external
({
          dependencies = {},
          devDependencies = {},
          peerDependencies = {},
          tsconfig = {},
          workspace,
        }) => {
          const pkgPath = new Path(workspace.packagePath);
          const srcPath = pkgPath.append(srcFolder);
          const testsPath = pkgPath.append(testsFolder);
          const references: ts.ProjectReference[] = [];
          const promises: Promise[] = [];

          // Extract and determine references
          Object.keys({ ...dependencies, ...devDependencies, ...peerDependencies }).forEach(
            depName => {
              if (namesToPaths[depName]) {
                references.push({
                  path: pkgPath.relativeTo(namesToPaths[depName]).path(),
                });
              }
            },
          );
github beemojs / beemo / packages / driver-typescript / src / TypeScriptDriver.ts View on Github external
this.tool.getWorkspacePackages({ root: workspaceRoot }).forEach(({ workspace }) => {
      const pkgPath = new Path(workspace.packagePath);
      const srcPath = pkgPath.append(srcFolder);
      const testsPath = pkgPath.append(testsFolder);

      // Reference a package *only* if it has a src folder
      if (srcFolder && srcPath.exists()) {
        config.references!.push({
          path: workspaceRoot.relativeTo(pkgPath).path(),
        });

        // Reference a separate tests folder if it exists
        if (testsFolder && testsPath.exists()) {
          config.references!.push({
            path: workspaceRoot.relativeTo(testsPath).path(),
          });
        }
      }
github milesj / build-tool-config / packages / config / lib / index.js View on Github external
workspacePrefixes.forEach(wsPrefix => {
                    context.addArgs([
                        new core_1.Path(wsPrefix, constants_1.DIR_PATTERN, `**/*.${exts}`).path(),
                        new core_1.Path(wsPrefix, '*.{md,json}').path(),
                    ]);
                });
            }
github milesj / build-tool-config / packages / config / lib / scripts / Build.js View on Github external
this.tool.getWorkspacePackages().forEach(pkg => {
            const srcPath = new core_1.Path(pkg.workspace.packagePath, 'src');
            if (!srcPath.exists()) {
                ignorePackages.push(pkg.name);
            }
        });
        args.push(`--workspaces=${ignorePackages.length > 0 ? `!(${ignorePackages.join('|')})` : '*'}`);
github airbnb / nimbus / packages / config-eslint / src / index.ts View on Github external
function fromHere(filePath: string): string {
  return `./${new Path(process.cwd()).relativeTo(
    new Path(__dirname, '../lib', filePath).resolve(),
  )}`;
}
github airbnb / nimbus / packages / config-eslint / src / index.ts View on Github external
function fromHere(filePath: string): string {
  return `./${new Path(process.cwd()).relativeTo(
    new Path(__dirname, '../lib', filePath).resolve(),
  )}`;
}
github beemojs / beemo / packages / driver-typescript / src / TypeScriptDriver.ts View on Github external
function join(...parts: string[]): string {
  return new Path(...parts).path();
}
github airbnb / nimbus / packages / config-jest / src / index.ts View on Github external
function fromHere(filePath: string): string {
  return `/${new Path(process.cwd()).relativeTo(
    new Path(__dirname, '..', filePath).resolve(),
  )}`;
}
github airbnb / nimbus / packages / config-jest / src / index.ts View on Github external
workspaces.forEach(wsPath => {
      roots.push(new Path('', wsPath.replace('/*', '')).path());
    });
  } else {

@beemo/core

Manage all dev tool configurations in a single centralized repository.

MIT
Latest version published 2 years ago

Package Health Score

50 / 100
Full package analysis