Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman authored Aug 12, 2022
1 parent 592e2fd commit 2b256d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions code/lib/builder-manager/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from './types';
import { getData } from './utils/data';
import { safeResolve } from './utils/safeResolve';
import { readOrdererFiles } from './utils/files';
import { readOrderedFiles } from './utils/files';

// eslint-disable-next-line import/no-mutable-exports
export let compilation: Compilation;
Expand Down Expand Up @@ -120,7 +120,7 @@ const starter: StarterFunction = async function* starterGeneratorFn({
router.use(`/sb-addons`, express.static(addonsDir));
router.use(`/sb-manager`, express.static(coreDirOrigin));

const { cssFiles, jsFiles } = await readOrdererFiles(addonsDir);
const { cssFiles, jsFiles } = await readOrderedFiles(addonsDir);

yield;

Expand Down Expand Up @@ -185,7 +185,7 @@ const builder: BuilderFunction = async function* builderGeneratorFn({ startTime,
yield;

const managerFiles = copy(coreDirOrigin, coreDirTarget);
const { cssFiles, jsFiles } = await readOrdererFiles(addonsDir);
const { cssFiles, jsFiles } = await readOrderedFiles(addonsDir);

yield;

Expand Down
2 changes: 1 addition & 1 deletion code/lib/builder-manager/src/utils/files.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { writeFile, ensureFile } from 'fs-extra';
import { compilation } from '../index';

export async function readOrdererFiles(addonsDir: string) {
export async function readOrderedFiles(addonsDir: string) {
const files = await Promise.all(
compilation?.outputFiles?.map(async (file) => {
await ensureFile(file.path).then(() => writeFile(file.path, file.contents));
Expand Down

0 comments on commit 2b256d3

Please sign in to comment.