Welcome Guest, Not a member yet? Register   Sign In
Project template creater
#1

[eluser]jwindhorst[/eluser]
So I've started working on a way to create a template based project in a bash Apache2 environment, and was wondering if anyone else would find it useful.

1. Essentially what I have done is downloaded codeigniter in it's vanilla form.
2. I've added a functions_helper file with some utility functions in it.
3. Set up generice header and footer views that a auto included with the custom local_view function.
4. Defined a few framework template views to help define a very basic view structure. eg. 2 column, 3 column.
5. Included custom css files based on the framework template defined in the initial project view.

Once I had the base level CI structure set up, I tar'd and gunzipped the entire package and moved it to a new directory called releases. The initial was in a directory called src. The next step (which I'm still in the middle of) is:

1. Copy of the the release tar files to a designated directory in a subdirectory of the project name. (These arguments are both passed in), and untar.
2. Use echo and >> in bash to add to constants to the CI application/config/constants.php file for the framework name, and the project name.
3. Copy a template version of a sites-available (Apache2 required here.) VirtualHost config file, and use sed to swap out to important configurations.
4. Run a2ensite project_name to enable the site
5. Restart apache2 service.

All of the first list was preparation really. The second part runs as a bash command with 3 arguments:
1. project_name
2. vhost destination directory (the script creates a sub directory as the project_name automatically)
3. framework this is the default layout framework that you would like to use for this project.

Once it is all said and done, the site should be up and running with a black and white HTML/CSS page, with none, 2, or 3 columns, two different locations for a masthead, liquid layout, css reset, other basic css files, jquery already sourced into a header file, fancybox (I like to use it so I added it). It's all just laid out and ready to go.

Moving forward, once I can see the framework in the browser I would like to make the borders of the different sections so that someone could essentially drap and drop their framework in the browser and have the corrected css displayed on the screen for them. This would allow you to visually change the height and width, or hide and show any of the default framework type elements inside the browser, but to save it the traditional way in a file via copy and paste.

I'm curious to see if anyone else out there would find these scripts useful?




Theme © iAndrew 2016 - Forum software by © MyBB