function generatePackageBuildFiles(pkg) {
        let buildFile = printPackage(pkg);
        const binBuildFile = printPackageBin(pkg);
        if (binBuildFile.length) {
            writeFileSync(path.posix.join(pkg._dir, 'bin', 'BUILD.bazel'), BUILD_FILE_HEADER + binBuildFile);
        }
        const indexFile = printIndexBzl(pkg);
        if (indexFile.length) {
            writeFileSync(path.posix.join(pkg._dir, 'index.bzl'), indexFile);
            buildFile = `${buildFile}
# For integration testing
exports_files(["index.bzl"])
`;
        }
        writeFileSync(path.posix.join(pkg._dir, 'BUILD.bazel'), BUILD_FILE_HEADER + buildFile);
    }
/**
     * Generates all BUILD & bzl files for a package.
     */
Generates all BUILD & bzl files for a package.
Generates all BUILD & bzl files for a package .
function generatePackageBuildFiles(pkg) {
        let buildFile = printPackage(pkg);
        const binBuildFile = printPackageBin(pkg);
        if (binBuildFile.length) {
            writeFileSync(path.posix.join(pkg._dir, 'bin', 'BUILD.bazel'), BUILD_FILE_HEADER + binBuildFile);
        }
        const indexFile = printIndexBzl(pkg);
        if (indexFile.length) {
            writeFileSync(path.posix.join(pkg._dir, 'index.bzl'), indexFile);
            buildFile = `${buildFile}
# For integration testing
exports_files(["index.bzl"])
`;
        }
        writeFileSync(path.posix.join(pkg._dir, 'BUILD.bazel'), BUILD_FILE_HEADER + buildFile);
    }
function generatePackageBuildFiles ( pkg ) { let buildFile = printPackage ( pkg ) ; const binBuildFile = printPackageBin ( pkg ) ; if ( binBuildFile . length ) { writeFileSync ( path . posix . join ( pkg . _dir , 'bin' , 'BUILD.bazel' ) , BUILD_FILE_HEADER + binBuildFile ) ; } const indexFile = printIndexBzl ( pkg ) ; if ( indexFile . length ) { writeFileSync ( path . posix . join ( pkg . _dir , 'index.bzl' ) , indexFile ) ; buildFile = ` ${ buildFile } ` ; } writeFileSync ( path . posix . join ( pkg . _dir , 'BUILD.bazel' ) , BUILD_FILE_HEADER + buildFile ) ; }
Generates all BUILD & bzl files for a package.
Generates all BUILD & bzl files for a package .