Generator-slim

A Yo Generator which sets up a new, on the Slim Framework based, project.

View the Project on GitHub katywings/generator-slim

Generator-slim

Build Status

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.

Getting started

What do you get?

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

Features

Basic

Server Side

Client Side

Server Setup

Basic

The generator comes with a included server for php. For faster development, I added a watcher with build at change and livereload.

Manual Installation

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:

Environments

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!

Development

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.

Production

Script and CSS Files are served minified. No livereload! MySQL is the active database.

Further Grunt Tasks

Jasmine testing

Building dist

The generated distribution includes just the needed files and is as small as possible.

Fetching npm and bower modules

Changelog

License

MIT License