Skip to content

Commit

Permalink
BIG + twig
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Jun 1, 2015
1 parent b80e4d4 commit 4078ac2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions .hidev/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package:
composer.json:
require:
yiisoft/yii2: '~2.0'
yiisoft/yii2-twig: '~2.0'
symfony/yaml: '~2.7'
hiqdev/yii2-collection: '*@dev'
codegyre/robo: '*'
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
],
"require": {
"yiisoft/yii2": "~2.0",
"yiisoft/yii2-twig": "~2.0",
"symfony/yaml": "~2.7",
"hiqdev/yii2-collection": "*@dev",
"codegyre/robo": "*"
Expand Down
1 change: 1 addition & 0 deletions goals/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Config extends File implements BootstrapInterface
'README.md' => 'readme',
'README.txt' => 'readme',
'README.markdown' => 'readme',
'LICENSE' => 'license',
'LICENSE.md' => 'license',
'LICENSE.txt' => 'license',
'LICENSE.markdown' => 'license',
Expand Down
2 changes: 1 addition & 1 deletion goals/License.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ class License extends Template
{
public function getTemplate()
{
return 'licenses/' . $this->package->license;
return 'licenses/' . $this->package->license . '.twig';
}
}
10 changes: 9 additions & 1 deletion hidev
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,15 @@ $application = new hidev\components\Application([
'@app/views' => '@config/templates',
],
],

'renderers' => [
'twig' => [
'class' => 'yii\twig\ViewRenderer',
'cachePath' => '@runtime/Twig/cache',
'options' => [
'auto_reload' => true,
],
],
],
],
'cache' => [
'class' => 'yii\caching\FileCache',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Copyright © <?= $config->package->years ?>, <?= $config->vendor->titleAndHomepage ?>

Copyright © {{ config.package.years }}, {{ config.vendor.titleAndHomepage }}
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -12,7 +11,7 @@
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of <?= $config->vendor->title ?> nor <?= $config->package->label ?> nor the names of its
* Neither the name of {{ config.vendor.title }} nor {{ config.package.label }} nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

Expand Down
2 changes: 1 addition & 1 deletion views/licenses/MIT.php → views/licenses/MIT.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © <?= $config->package->years ?>, <?= $config->vendor->titleAndHomepage ?>
Copyright © {{ config.package.years }}, {{ config.vendor.titleAndHomepage }}

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 4078ac2

Please sign in to comment.