honzahovorka/nette-sandbox
最新稳定版本:v2.2.3
Composer 安装命令:
composer create-project honzahovorka/nette-sandbox
包简介
Pre-setted minimal Nette Framework project
README 文档
README
Sandbox is a pre-packaged and pre-configured Nette Framework application that you can use as the skeleton for your new applications. This is fork of Nette srigi-sandbox which is optionated fork of original nette-sandbox.
To get better starting point for my Nette Framework projects, I modified original sandbox to fit my style. Most notable differences are:
-
removed Adminer
I use separate installation of Adminer as local virtualhost.
-
cleanup of uneeded files (
web.config,print.css)Does anybody care about IIS webserver? Printing webpages?
-
removed
App\Presenters,App\Modelnamespaces (everything is inAppnamespace)Since there is a subword
PresenterinApp\SomePresenter, I don't see any sense to have namespace for presenters. MyUserPresenterwill not definitely have name collision with myUserModelorUserFormsince there is that subwordPresenter,Model,Formin the name of my classes. -
renamed
HomepagePresentertoDefaultPresenterDefault entry point in sandbox should have more general name.
-
more configuration directives by default
Example of configuring of presenters.
-
more complete
.gitignorefile -
lots of code cleanup
Removed obvious comments from code, better
use(namespace) conventions in code, moved CSS styles to.cssfiles. -
layout system using
@wrapper.latteUsing Nette's template-inheritance we can define layout for each presenter. There is nice example -
DefaultPresenteruse 2-columns layout,SignPresenteruse 1-colum layout. -
rewrite of signup form template to use fully manual rendering
also moved this template to more suitable place
-
gulpjs dev-stack
Stack for
SASSstylesheets, two main processes - developement (with livereload) & build. -
Flunorette database layer.
Installing
The best way to install srigi-sandbox is by using Composer. If you don't have Composer yet, download
it following the instructions. Then use command:
composer create-project srigi/nette-sandbox myapp
cd myapp
Make directories temp and log writable. Navigate your browser
to the www directory and you will see a welcome page. PHP 5.4 allows
you run php -S localhost:8888 -t www to start the web server and
then visit http://localhost:8888 in your browser.
It is CRITICAL that whole app, log and temp directories are NOT accessible
directly via a web browser! See security warning.
Devstack
hexicz-sandbox use gulpjs as a minimal dev-stack to support you during development. To fully embrace advantages of dev-stack you must install needed tools & packages. Nodejs is main requirement. See installation instruction on how to install nodejs on your machine.
Then install dev-stack:
npm install -g gulp bower
npm install (in root of your project)
bower install
Run devstack:
gulp
Now you can use livereload for automatic refresh of your browser when you change files of your project.
Your .js files will be automatically linted, you can see code-style errors on the console.
Build your project
gulp build
This command will optimize frontend parts of your project & create build directory with builded project.
License
- Nette: New BSD License or GPL 2.0 or 3.0 (http://nette.org/license)
- jQuery: MIT License (https://jquery.org/license)
- Adminer: Apache License 2.0 or GPL 2 (http://www.adminer.org)
- Sandbox: The Unlicense (http://unlicense.org)
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unlicense
- 更新时间: 2015-01-01