SrBrahma / gev

Effortlessly npx way to init slightly opinionated projects boilerplates
5 stars 0 forks source link

NPM publish doesn't include empty dirs #12

Open SrBrahma opened 2 years ago

SrBrahma commented 2 years ago

https://stackoverflow.com/questions/47456617/why-did-npm-deleted-empty-folder-when-published-package-to-npm-registry

The only solution I can think of is:

Have a prebuild script that will find empty dirs in the semitemplates and write them in a .json, like

emptyDirs.json

{
  "expo": [
    "src/components/common",
    "src/components/contexts",
  ] 
}

etc. Store it maybe on data/. On applySemitemplates(), those would be created for the current flavor.

This apply isn't require on dev env, as the empty dirs exists on local semitemplate dir.