codesandbox-importers icon indicating copy to clipboard operation
codesandbox-importers copied to clipboard

Respect gitignore when publishing

Open Haroenv opened this issue 1 year ago • 0 comments

I often publish a local version of an example I have so that I can revert the changes, but there's some files commonly ignored that I need to remove from the final sandbox, or even prevent the publish if I don't remove them first. A couple examples are:

  • dist
  • .next

I could see even .env, which would be even more problematic.

When gathering the files to publish, it should first check git to list any files that are ignored in the current repo and not publish those.

I'm happy to do a PR if it's clear where to add these checks + will be approved.

Thanks!

similar issue: https://github.com/codesandbox/codesandbox-importers/issues/67

Haroenv avatar Jan 16 '23 10:01 Haroenv