Skip to content

Commit

Permalink
Moves //packages/resource_injector/... to `//tools/binaries/resourc…
Browse files Browse the repository at this point in the history
…e_injector/...`.

Refs #67.

This is because the resource injector is invoked as a tool at build time, not a package installed by the user.
  • Loading branch information
dgp1130 committed Feb 19, 2023
1 parent c1c8f6d commit f388a27
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as fs from '../../common/fs';
import * as fs from '../../../common/fs';
import { HTMLElement, parse } from 'node-html-parser';
import { InjectorConfig, InjectScript } from './config';
import { AnnotationNode, walkAllAnnotations } from '../../common/prerender_annotation_walker';
import { AnnotationNode, walkAllAnnotations } from '../../../common/prerender_annotation_walker';

/**
* Parses the given HTML document and injects all the resources specified by the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as fs from '../../common/fs';
import { createAnnotation } from '../../common/models/prerender_annotation';
import * as fs from '../../../common/fs';
import { createAnnotation } from '../../../common/models/prerender_annotation';
import { InjectorConfig } from './config';
import { inject } from './injector';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { promises as fs } from 'fs';
import * as path from 'path';
import * as yargs from 'yargs';
import { main } from '../../common/binary';
import { mdSpacing } from '../../common/formatters';
import { main } from '../../../common/binary';
import { mdSpacing } from '../../../common/formatters';
import { InjectorConfig } from './config';
import { inject } from './injector';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { promises as fs } from 'fs';
import { InjectorConfig } from './config';
import { execBinary, ProcessResult } from '../../common/testing/binary';
import { useTempDir } from '../../common/testing/temp_dir';
import { execBinary, ProcessResult } from '../../../common/testing/binary';
import { useTempDir } from '../../../common/testing/temp_dir';

const injector = 'packages/resource_injector/resource_injector.sh';
const injector = 'tools/binaries/resource_injector/resource_injector.sh';

/** Invokes the resource injector binary. */
async function run({ inputDir, config, bundle, outputDir }: {
Expand Down Expand Up @@ -330,6 +330,6 @@ describe('injector', () => {
`Binary unexpectedly succeeded. STDERR:\n${stderr}`,
);
expect(stdout).toBe('');
expect(stderr).toContain('packages/resource_injector/injector.js');
expect(stderr).toContain('tools/binaries/resource_injector/injector.js');
});
});
2 changes: 1 addition & 1 deletion tools/internal/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ alias(

alias(
name = "resource_injector",
actual = "//packages/resource_injector",
actual = "//tools/binaries/resource_injector",
)

alias(
Expand Down

0 comments on commit f388a27

Please sign in to comment.