remix-run / remix-website

347 stars 79 forks source link

Remove unused package `dotenv-cli` #170

Closed fernandocanizo closed 9 months ago

fernandocanizo commented 9 months ago

It looks that the development dependency dotenv-cli is unused. A grep through the repository didn't show matches. However I understand it's a CLI tool to run the project with different or even combine .env files.

While I don't see any reason for this dependency, if there's some valid use, then it should be documented.

package.json uses it for the preview script:

    "preview": "cross-env NODE_ENV=production dotenv node server.mjs",

But we already have dotenv setup on vitest.config.mts, so it seems is not doing any useful work there. Or at least I cannot see it after reading the package documentation.

brookslybrand commented 9 months ago

Hi @fernandocanizo, thanks for keeping an eye out on unnecessary extra packages

You're right, this is used in package.json for the preview script. The use of the .env file in general is documented, so I feel okay that this package is not called out specifically in the README. However, if you feel like the README is lacking, I'm happy to review a PR

vitest.config.mts is merely the testing suite setup, which is different from what the preview script does. Removing dotenv-cli would cause the preview script to break.