ulsdevteam / ccvgd-frontend

Contemporary Chinese Village Gazetteer Data front end application
MIT License
2 stars 3 forks source link

Consider which deployment files should be ignored within git #6

Closed ctgraham closed 3 years ago

ctgraham commented 3 years ago

Almost certainly files under dist/ and node_modules/ should be included in the a .gitignore so that the git repository is only tracking local source code changes. The dependencies and the packaged application should only exist in deployed packages (releases), or left to the administrator to deploy when the application is installed.

To capture the state of the the application when it has been tested with specific dependencies, you will want to include the package-lock.json file in the git repository. If specific dependency versions are non-critical, you may want to exclude the package-lock.json file via the .gitignore.

For configuration files where the administrator who is deploying the application has choices to make (such as database names, passwords, backend hostnames, ports, etc.), the git repo should provide sample files or sample values, with instructions to the administrator for changes. For example, consider src/environments/environment.prod.ts.

Xiaoxin-He commented 3 years ago
ctgraham commented 3 years ago

I think this issue is almost resolved, but we still need to remove the node_modules directory itself from the repo.

Xiaoxin-He commented 3 years ago

node_modules is updated in git ignore

ctgraham commented 3 years ago

Confirmed.