fatback
v1.0.0
Published
BrightAuthor Connected Composite Development Project
Downloads
45
Readme
fatback
Requirements
How To Notes
Git Configuration
- git config --global diff.submodule log (so you get clearer container diffs when referenced submodule commits changed)
- git config --global fetch.recurseSubmodules on-demand (so you are confident new referenced commits for known submodules get fetched with container updates)
- git config --global status.submoduleSummary true (so git status gets useful again when a referenced submodule commit changed)
Install
- install node/npm
- clone fatback
- cd fatback
- npm run init-comp (WARNING: this will delete any uncommitted changes)
- npm install
- npm run setup-comp
- npm run build-comp NOTE: AS OF v0.15.0 THIS IS CURRENTLY NOT SUPPORTED
- cd path/to/submodule
- execute any custom configurations/build steps for each submodule
Switching/pulling fatback branch updates /
- git pull / checkout
- start Install#3 above for fresh build
Adding a submodule
- git submodule add [repo url]
- add submodule configuration to fatback/package.json#dependencies
for example "@brightsign/<package_name>": "file:./<package_name>",
for a package named ‘ba-notification-ui’, the entry would be “@brightsign/ba-notification-ui”: “file:./ba-notification-ui”,
note, the assumed order of fatback/package.json#dependencies is such that submodules are specified before the submodules they depend on. For example, "@brightsign/bacon": "file:./bacon" is specified before all other submodules as bacon depends on all other submodules (directly or indirectly) but has no submodules which depend on it
- add package.json#dependencies configuration for all other submodules that require the newly added submodule
for example "@brightsign/<package_name>": "",
for a package named ba-notificiation-ui, the entry might be “@brightsign/ba-notification-ui”: “0.0.2”, or, for a package not published yet, it might have the form “@brightsign/ba-notification-ui”: “git+ssh://[email protected]:ba-notification-ui#41a1b60605ead9794ec8fdb931f3833d5”
for more information regarding npm dependency definition formats, see https://docs.npmjs.com/files/package.json#dependencies
- start Install#3 above for fresh build
Permanently removing a submodule
- git submodule deinit path/to/submodule
- git rm path/to/submodule
- git commit -am “Removed submodule X”
- start Install#3 above for fresh build
Grabbing updates/change branch from a submodule
- cd path/to/submodule
- git fetch
- git checkout [commit-sha1 | branch]
- cd -
- git commit -am “Updated submodule X to: blah blah”
- git push
- start Install#6 above for fresh build
Pushing updates to a submodule
- git submodule update --remote --rebase -- path/to/module
- cd path/to/submodule
- local work, testing, eventually staging
- git commit -am “Update to central submodule: blah blah”. WARNING: if committing to local head, checking out remote branch after this step will wipe locally committed (unpushed) changes. It is recommended that you instead work from a local branch when making changes to submodules
- git push
- cd -
- git commit -am “Updated submodule X to: blah blah”
- git push