C

cherryex

CherryPy extended functionality, decoupling application development from web framework.

9954f57c Merge branch 'develop' into 'master' · by Aaron

Building a new project

Remove app/ directory and replace with application module using 'git submodule'

git submodule add git@gitlab.onnix.io:internal/prioritize.git prioritize

Remove html/ directory and replace with HTTP framework using 'git submodule'

git submodule add git@gitlab.onnix.io:code/cherryex.git html

Remove public/ directory and replace with coded templates and assets using 'git submodule'

git@gitlab.onnix.io:templates/onnix-gentelella.git public

If you want to use any of the existing directory structure, you will run into a problem after deleting:

$ rm -rf html/
$ git submodule add git@gitlab.onnix.io:code/cherryex.git html
'html' already exists in the index

This can be resolved by removing the directory from cache:

$ git rm -r --cached html
rm 'html/README.md'

Once you have resolved all the GIT nuances to get your project in a state ready for development, make sure you change the project origin to point to your new Git repository location:

git remote add origin git@gitlab.onnix.io:internal/test-project.git

Finally, you can push the project, complete with submodule references

$ git commit
[project_import 70bb83e] Imported project code;
 8 files changed, 12 insertions(+), 12 deletions(-)
 create mode 100644 .gitmodules
 delete mode 100644 app/README.md
 create mode 160000 html
 delete mode 100644 html/README.md
 create mode 160000 prioritize
 create mode 160000 public
 delete mode 100644 public/assets/README.md
 delete mode 100644 public/templates/README.md
$ git push -u origin project_import;
Enter passphrase for key '/home/harry/.ssh/id_rsa': 
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 606 bytes | 303.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To gitlab.onnix.io:internal/web-app-template.git
 * [new branch]      project_import -> project_import
Branch 'project_import' set up to track remote branch 'project_import' from 'origin'.
$ git checkout -b project_import
A   .gitmodules
D   app/README.md
A   html
D   html/README.md
A   prioritize
A   public
D   public/assets/README.md
D   public/templates/README.md
Switched to a new branch 'project_import'

Cloning a Project

When you clone this project, none of the submodules will be cloned.

git submodule init
git submodule update