Skip to content

Conversation

@briangregoryholmes
Copy link
Contributor

@briangregoryholmes briangregoryholmes commented Jan 13, 2026

This PR alters the npm run dev script to accept an optional parameter that specifies a particular test project to run: adbids, openrtb, adimpressions or blank.

For example, npm run dev -- adbids will start local development using the AdBids project instead of the files in dev-project

The script also accepts explicit paths: npm run dev -- /path/to/project/folder

@briangregoryholmes briangregoryholmes self-assigned this Jan 13, 2026
@briangregoryholmes briangregoryholmes changed the title feat: add test project script feat: update npm run dev to accept project parameter Jan 13, 2026
@briangregoryholmes briangregoryholmes changed the title feat: update npm run dev to accept project parameter feat: update npm run dev to accept project name or explicit path Jan 13, 2026
Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

1. Missing clean-project.cjs script

The package.json references node scripts/clean-project.cjs but this file is not included in the PR. Running npm run clean will fail with a module not found error.

2. Case mismatch for blank project

The script maps blank to lowercase "blank":

blank: path.join(testLocation, "blank"),

But the actual directory is capitalized Blank. Running npm run dev -- blank will fail.

3. Consider case-insensitive argument matching

Users might type AdBids or ADBIDS but only adbids works. A simple .toLowerCase() on the input would improve usability.

4. The ESLint ignore pattern is broader than necessary

The pattern scripts/**/*.{js,cjs,mjs} ignores all current and future scripts. Consider ignoring only scripts/dev.cjs specifically, or adding ESLint comments within the file if only certain rules need suppression.

5. Consider using spawn instead of execSync

Using execSync blocks the Node process and doesn't handle signals cleanly. If a user presses Ctrl+C, signal handling may be inconsistent. Using spawn with { stdio: 'inherit' } and forwarding signals would be more robust, though this is a minor concern for a dev script.


Developed in collaboration with Claude Code

@briangregoryholmes
Copy link
Contributor Author

briangregoryholmes commented Jan 14, 2026

1. Missing clean-project.cjs script

Leftover from a previous approach. Reverted back to the pre-existing clean script.

2. Case mismatch for blank project

Fixed.

3. Consider case-insensitive argument matching

Added.

4. The ESLint ignore pattern is broader than necessary

Decided to just remove the ignore pattern and allow type checking of the file. Also updated to module syntax.

5. Consider using spawn instead of execSync

Done.

Copy link
Contributor

@ericpgreen2 ericpgreen2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@briangregoryholmes briangregoryholmes merged commit f84d2d0 into main Jan 15, 2026
4 checks passed
@briangregoryholmes briangregoryholmes deleted the bgh/add-test-project-scripts branch January 15, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants