Skip to content

iwarner/CodeBlender-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INTRODUCTION
------------

The following file will guide you through the set up of the CodeBlender Template project.

Note

    Your local machine should Include the vHost file from this project.

        Include "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/config/vhost.conf"

    Create the necessary hosts entry in /etc/hosts

        127.0.0.1 template.codeblender.net.dev

SSH KEY SETUP
-------------

GitHub requires ssh key access - follow the the links below for guidance

    http://help.github.com/mac-set-up-git/
    http://om4.com.au/ssh-rsa-key-pairs-passphrases-leopard/


LOCAL DATA DIRECTORY
--------------------

Create symlinks on your local for the following directories.
These will mimic the live environment.

    sudo mkdir /var /var/www "/var/www/Triangle Solutions Ltd" "/var/www/Triangle Solutions Ltd/template.codeblender.net"
    sudo chown -R iwarner "/var/www/Triangle Solutions Ltd/template.codeblender.net"

Project Folder

    ln -s "/Users/iwarner/Dropbox/01. Triangle Solutions/Sites A-C/CodeBlender/template.codeblender.net/www" "/var/www/Triangle Solutions Ltd/template.codeblender.net/"

Zend Framework

    mkdir /var/www/library
    ln -s /Users/iwarner/Triangle/CodeBlender/library/Zend /var/www/library/Zend


GIT SETUP
---------

Guide

    cd "/var/www/Triangle Solutions Ltd/template.codeblender.net/www"

New Git Repository

    git init
    git remote add origin git@github.com:iwarner/CodeBlender-Template.git
    git push -u origin master

Clone Repository

    Create a new github repository

    Clone the Template

        git clone git@github.com:iwarner/CodeBlender-Template.git www

    Edit the .git/config file
    change the repo url to the new repository

    [remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = git@github.com:YOURNAME/bar.git #replace foo with bar

    Optionally add the Template as an upstream source

        git remote add upstream git@github.com:iwarner/CodeBlender-Template.git

    Finally, push your new repository up to GitHub:

    git push -u origin master

    Now you can push/pull from your new repo.
    You should also be able to merge upstream changes using the following command.

    git fetch upstream
    git merge upstream/master

Commands

    git commit -a -m ""
    git pull -u origin master
    git push -u origin master


GIT IGNORE
----------

    nano .gitignore

    .DS_Store
    Thumbs.db
    /data/cache/*
    /data/logs/*
    /data/sessions/*
    !.gitignore
    /public/.sass-cache


GIT SUBMODULE SETUP
-------------------

This is only necessary if the project is created from scratch, otherwise if cloning
an existing repository the project will already have links for the submodules.

    git submodule init
    git submodule update

To pull from the master on all submodules from the root user:

    git submodule foreach git pull -u origin master
    git submodule foreach git push -u origin master

To switch the branch to master go into each submodule and run the command

    git checkout master

Repository must be a GIT repository to activate submodules

Article

    http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/

Local Directory

    cd "/var/www/Triangle Solutions Ltd/template.codeblender.net/www"

Library

    CodeBlender

        git submodule add git@github.com:iwarner/CodeBlender.git library/CodeBlender
        git submodule update --init

    Zend Framework

        ln -s "/var/www/library/Zend" "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/library"

Modules

    Core

        git submodule add git@github.com:iwarner/CodeBlender-ModuleCore.git application/modules/core
        git submodule update --init

Layout

    git submodule add git@github.com:iwarner/CodeBlender-Layouts.git application/layouts
    git submodule update --init

Theme

    git submodule add git@github.com:iwarner/CodeBlender-Themes.git public/theme
    git submodule update --init


REMOVE SUBMODULES
-----------------

Edit the .git/config and remove the link
Edit the .gitmodules and remove the links

Clear the cache for the submodules

    git rm --cached "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/application/layouts"
    git rm --cached "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/public/theme"
    git rm --cached "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/application/modules/core"
    git rm --cached "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/library/CodeBlender"

Delete the folders

    sudo rm -r "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/application/layouts"
    sudo rm -r "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/public/theme"
    sudo rm -r "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/application/modules/core"


GIT REVERT CHANGES
------------------

    http://book.git-scm.com/4_undoing_in_git_-_reset,_checkout_and_revert.html

Fix one file

    git checkout -- .gitignore

Fixing un-committed mistakes

    git reset --hard HEAD


EXT JS
------

    SymLink


ZEND FRAMEWORK
--------------

Zend should be included from your local system.
It does not come part of the CodeBlender library.

Please download from here:

    http://framework.zend.com/download/latest


DATA DIRECTORY
--------------

This directory and all its submodules must be writable by the web server

    sudo chown -R iwarner:www-data "/var/www/Triangle Solutions Ltd" "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/data"
    sudo chmod -R g+w "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/data"


COMPASS
-------

The Compass Stylesheet Authoring Framework helps you build and maintain your
stylesheets and makes it easy for you to use stylesheet libraries provided by others.

Install Compass

    http://compass-style.org/install/

    sudo gem update --system
    sudo gem install compass
    sudo gem install compass-validator

Create / Watch Validate / Project

    compass watch "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/public"
    compass create "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/public"
    compass compile "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/public"
    compass validate "/var/www/Triangle Solutions Ltd/template.codeblender.net/www/public"

About

CodeBlender - General Application Template

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published