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.
npm install -g yo
npm install -g generator-slim
yo 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
grunt server
and you`re ready for developmentyo slim:route
The generator comes with a included server for php. For faster development, I added a watcher with build at change and livereload.
grunt server
The server runs in development!
grunt server:production
to launch the production serverIf 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:
grunt
grunt watch
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
or grunt development
to switch to developmentScript and CSS Files are served minified. No livereload! MySQL is the active database.
grunt production
to switch to productiongrunt test
to start the jasmine testsThe generated distribution includes just the needed files and is as small as possible.
grunt dist
to generate the distgrunt dist
changes automatically to production, run grunt
if you wanna change back to development!grunt fetch
0.11.1
0.11.0
0.10.6
0.10.5
grunt fetch
creates lib Directory, is fixed0.10.4
0.10.1
0.10.0
0.9.9
0.9.8
grunt server
, the Browser started before the server was ready, is fixedgrunt server
creates dist folder, is fixed0.9.x
0.9.0