A Yo Generator which sets up a new, on the Slim Framework based, project.
Founder: Katja Lutz, Maintainer: wanted, Delevopers: wanted
This project needs several overhauls! And has a couple of bugs with the current Version of node.js If anyone has the interest to develop this project further, please contact me! I'm out of time.
This yeoman generator sets up a PHP Project including Slim Framework, all needed configs to begin with developing and several grunt tasks. Yes its a PHP Project Generator and automatically downloads composer and several php libs.
(based on the yeoman generator-generator)
For the client part, ive included Backbone and Marionette. Coffeescript and Less are integrated in app/src and automatically builded and minified into the public folder.
- Make sure you have yo installed:
npm install -g yo
- Install composer global on your machine
- Install the generator:
npm install -g generator-slim
The following directory structure do you get:
. ├── .bowerrc ├── .editorconfig ├── .gitignore ├── app │ ├── app.php │ ├── autoload.php │ ├── bootstrap.php │ ├── config │ │ ├── config.development.php │ │ ├── config.env.php │ │ └── config.production.php │ ├── helpers │ │ ├── Authhash.php │ │ └── Search.php │ ├── models │ ├── routes │ │ └── index.php │ ├── src │ │ ├── coffee │ │ │ ├── app.coffee │ │ │ └── views │ │ │ └── viewTest.coffee │ │ ├── hbs │ │ │ ├── config.env.hbs │ │ │ └── head.hbs │ │ └── less │ │ └── styles.less │ └── views │ ├── errors │ │ └── 404.twig │ ├── index.twig │ └── layouts │ ├── LICENSE.md │ ├── breadcrumb.twig │ ├── head.html │ ├── master.twig │ └── one_column.twig ├── bower.json ├── bower_modules ├── cache ├── composer.json ├── composer.lock ├── composer.phar ├── composer_modules │ ├── autoload.php │ └── composer │ ├── ClassLoader.php │ ├── autoload_classmap.php │ ├── autoload_namespaces.php │ ├── autoload_real.php │ └── installed.json ├── gruntfile.js ├── logs ├── node_modules └── public ├── .htaccess ├── css ├── dev ├── img ├── index.php └── js
- All what you need for fast developing in PHP and Coffescript
- Several optimized grunt tasks
- Ready after install: start
grunt serverand you`re ready for development
- Yeah git init was started at the installation ;)
- PHP Basic Setup
- Slim Framework Configured
- Development / Production Settings
- Templates (master layout based on h5b, one-column, breadcrumb, 404 error)
- PHP Mailer
- Several PHP Helper Classes (AuthHash Class, Search Class: File-based search Crawler)
- Sub Generator for Routes
- New: Jasmine Testing
- Less and Coffeescript Automatic Compilation, Integration and Livereload
The generator comes with a included server for php. For faster development, I added a watcher with build at change and livereload.
- PHP 5.4 is prerequired! Install it first, example: mac
- Change the hashes in app/app.php, app/helpers/authHash.php
- Change the sqlite and mysql Configs in app/config/ to your needs
grunt serverThe server runs in development!
grunt server:productionto launch the production server
If you don't wanna use the included grunt server, you can use any Apache/PHP Webserver. To get your webserver to work with the project you need to change the following things:
- Setup your Apache Webserver DocumentRoot to public/
- And to start the watcher:
Thanks to the included server you often really doesnt need the following commands. But if you use an own Apache, PHP Server you need these commands to switch between the environments!
All Script and CSS Files are served in full length, no uglifying. PHP View Files doesnt get cached. Livereload is active. SQlite is the active database.
grunt developmentto switch to development
Script and CSS Files are served minified. No livereload! MySQL is the active database.
grunt productionto switch to production
- Create your Jasmine Tests in the folder test/jasmine/
grunt testto start the jasmine tests
The generated distribution includes just the needed files and is as small as possible.
grunt distto generate the dist
grunt distchanges automatically to production, run
gruntif you wanna change back to development!
- Whole cleanup of the generator code by hariadi
- Bug: Installation with current version of yeoman not possible, is fixed
- Bug: Slim Framework Views are broken, is fixed
- Bug: DateTime Warning, is fixed
- Bug: Breadcrumbs broken with current Bootstrap Version, is fixed
grunt fetchcreates lib Directory, is fixed
- Name of Sqlite Database file renamed to db.sqlite
- Bug: .htaccess not copied to the dist Folder, is fixed
- Updated to Yeoman Generator 0.12.0
- Added automatic App Secret and AuthHash generation
- Added Database Switch between Development (Sqlite) and Production (MySQL)
- Added Directory tmp including cache and Sqlite Database
- Removed chown command (obsolete)
- Bug: Readme not fully compatible with npmjs.org, is fixed
- Bug: no Sitename on 404 Template, is fixed
- Bug: Watcher breaks after several ticks, is fixed
- Added Jasmine Testing
- Extended the manual including the directory structure, features and new tips and tricks
- Corrected Bug: 404 error template wasnt loading correctly
- Changes in Gruntfile
- Bug: when running
grunt server, the Browser started before the server was ready, is fixed
grunt servercreates dist folder, is fixed
- Bug: when running
- English translation of 404 error template, and added some styling
- English translation of subgenerator:Route
- Description is coming :P
- First release