bloomcu-modules
v1.0.0
Published
Bloomcu Modules
Readme
BloomCU Modules
BloomCU Modules is a collection of modules used on our client sites such as a browser update notification, financial calculators and global site options.
These modules are added to the clients root theme directory as a git submodule. Git submodules make it easy to include these modules in a project while keeping their history separate.
Author: BloomCU
Table of Contents
Installation
Credit: Manuel Hutter
Cloning Project Repository with Submodule
This will first clone the repo, and then initialize and update (read on) all submodules.
git clone {repo_url} --recursiveIf you forget the --recursive flag when cloning, or when pulling in commits that add a Submodule, you have to do two steps: initialize, update:
git submodule init
git submodule updateUpdating Submodules
Easy:
git submodule update --remote
git add submodule_dir
git commit -m 'updated bloomcu_modules to latest'Adding Submodules to your project
If this submodule is not already included in the project (older, or non-base-theme project) first add this submodule to the project:
git submodule add {repo_url} bloomcu_modules
git commit -m 'added bloomcu_modules as a dependency'git submodule add works like git clone, so the directory name can be ommited. The changes will automatically be added to the index, so you can commit them right away!
Usage
Before you can start using the modules, they must be included in the theme:
Step 1
Add a copy of bloomcu-functions.php to the to theme's functions/ directory.
Step 2
Import bloomcu-function.php in functions.php:
// BloomCU Modules Functions
require_once( 'functions/bloomcu-functions.php' );Step 3
Add a copy of _bloomcu-imports.scss to the theme's assets/scss/vendor/ directory.
Step 4
Add a copy of _bloomcu-settings.scss to the themes's assets/scss/vendor/ directory.
Step 5
Import stylesheets in theme's assets/scss/vendor/_imports.scss:
@import "bloomcu-settings";
@import "bloomcu-imports";Step 6
Import vendor/_imports.scss from within assets/scss/app.scss:
@import 'vendor/imports';Step 7
Compile CSS and JS using grunt
grunt wor, for older projects:
grunt devDeployment
To deploy a website repository containing this private submodule using DeployBot, there are a couple required steps:
Step 1
Add the BloomCU Modules BitBucket SSH URL below, to .gitmodules:
[email protected]:bloomcu/bloomcu-modules.gitStep 2
Obtain the DeployBot Public Key for Submodules to authenticate DeployBot with Bitbucket. You can find this key in DeployBot by going to Repository > Settings and scroll to the bottom of the page.
Step 3
Add the DeployBot Public Key to the BloomCU Modules Access Keys in BitBucket.
Contributing
Please contribute by creating a branch, adding your commits, and opening a pull request.
