Currently numerous sub-folders are generated by the command yarn run build
, which may be performed in development, and is also performed in production by Travis CI to generate the .md and .html files for the production Gitbook. I do not think they do not need to be included in the Github repo, and could be safely Gitignored, but because they currently are included in the Github repo and aren't Gitignored, it slightly interferes with the development workflow.
For instance in development, when I run yarn run build
, it generates the following, and when you then run git status
it shows them all in 'green' as being Changes not staged for commit:
, when we don't care as they were just built. Because of this, when you actually make a change to a file, you have to sometimes "remember" what files you changed, particularly if the files you edited is one of the files in the docs/ directory that aren't automatically generated.
- Files that are automatically generated when you run
yarn run build
and by the CI. I think these could be Gitignored, and Removed from Github repo
docs/GLOSSARY.html
docs/api/classes/.md
docs/api/classes/.html
docs/api/index.html
docs/api/interfaces/.md
docs/api/modules/.md
docs/api-observable/**/*
docs/api-observable/classes/.md
docs/api-observable/modules/.md
docs/index.html
docs/rpc-core/classes/.md
docs/rpc-core/classes/.html
docs/rpc-core/index.html
docs/rpc-core/interfaces/.md
docs/rpc-core/modules/.md
docs/rpc-provider/classes/.md
docs/rpc-provider/index.html
docs/rpc-provider/interfaces/.md
docs/rpc-provider/modules/.md
docs/rpc-rx/classes/.md
docs/rpc-rx/index.html
docs/rpc-rx/interfaces/.md
docs/rpc-rx/modules/.md
docs/search_index.json
docs/type-extrinsics/interfaces/.md
docs/type-extrinsics/modules/.md
docs/type-jsonrpc/modules/.md
docs/type-storage/interfaces/.md
docs/type-storage/modules/.md
docs/types/classes/.md
docs/types/enums/.md
docs/types/interfaces/.md
docs/types/modules/*.md
I think we could remove the above from the Git repo since it's all auto-generated (i.e. running git rm docs/index.html docs/api/* docs/api-observable/* docs/rpc-core/* docs/rpc-provider/* docs/rpc-rx/* docs/search_index.json docs/type-extrinsics/* docs/type-jsonrpc/* docs/type-storage/* docs/types/*
-
Files/folders to keep in Github repo but that we want to Gitignore:
docs/gitbook//*
docs/html//*
docs/.nojekyll
-
Files to keep in Github repo but NOT to Gitignore
docs/examples/**/*
docs/README.md
docs/SUMMARY.md
docs/CONTRIBUTING.md
docs/GLOSSARY.md
Without doing the above changes, to hide the built files from displaying when you run git status
you may run git checkout -- docs/types/** docs/type-storage/** docs/type-jsonrpc/** docs/type-extrinsics/** docs/search_index.json docs/rpc-rx/** docs/rpc-provider/** docs/rpc-core/** docs/index.html docs/examples/**/*.html docs/api/** docs/api-observable/** docs/GLOSSARY.html
I've tried adding the following to the Gitignore file in the root directory, but haven't been able to get it to work and ignore the files.
# root docs folder to ignore
docs/**/*
# explicitly track certain content nested in the 'docs' folder
!docs/examples/**/*
!docs/README.md
!docs/SUMMARY.md
!docs/CONTRIBUTING.md
!docs/GLOSSARY.md