Skip to content

Commit

Permalink
be less clever with constants and log less dumb stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcc committed Aug 29, 2023
1 parent 6946752 commit 1244722
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion src/cli/lib/next-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export default async function updateNextConfigFile(parentDir: string = './') {
const pathsToCheck = ['next.config.js', 'next.config.mjs'];

for (let i = 0; i < pathsToCheck.length; i++) {
console.log('asdf');
const filePath = path.join(parentDir, pathsToCheck[i]);
let exists;
try {
Expand Down
6 changes: 1 addition & 5 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import path from 'node:path';
import fs from 'node:fs/promises';

const packageJsonContents = await fs.readFile(path.join(process.cwd(), 'package.json'), 'utf-8');
const packageJson = JSON.parse(packageJsonContents);

export const VIDEOS_PATH = path.join(process.cwd(), '/videos');
export const PACKAGE_NAME = packageJson.name;
export const PACKAGE_NAME = '@mux/next-video';
2 changes: 0 additions & 2 deletions tests/cli/lib/next-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ describe('updateNextConfig', () => {
const dirPath = await createTempDirWithConfig('next.config.mjs');
await updateNextConfigFile(dirPath);

console.log({ dirPath });

const updatedContents = await fs.readFile(path.join(dirPath, 'next.config.mjs'), 'utf-8');

assert(updatedContents.includes('next-video'));
Expand Down

0 comments on commit 1244722

Please sign in to comment.