Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: chatwork/Phest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.8.5
Choose a base ref
...
head repository: chatwork/Phest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 6,155 changed files with 723,186 additions and 31,372 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
phest/cache
sites/sample/output
sites/sample_htmlmail/output
sites/sample_i18n/output
sites/sample_plugin/output
sites/sample_staging/output
sites/sample_yaml/output
sites/z_phest_document/output
phest/lib/vendor/smarty/smarty/.svn
bootstrap3
50 changes: 50 additions & 0 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
### 2014年4月10日

**v0.10.0** 使用しているライブラリを刷新。YAMLの記法がより厳密になり、記法エラーの詳細がエラー表示されるように。ビルド結果がファイル種類別に分類されるように。

### 2014年2月28日

**v0.9.5** $_folder はトップディレクトリの場合、空文字列ではなく . が入るように。ステージング環境を有効にできるenablestagingオプションを追加。サイトの説明を表示するdescriptionオプションを追加。basetplを正規表現で切り替えることができる設定方法を追加。S3へのデプロイ時にS3側のオブジェクトを正規表現で削除させないパス設定が可能に。

### 2014年2月06日

**v0.9.4** leftdelimiter, rightdelimiter オプションを追加

### 2014年2月04日

**v0.9.3** scssphpをアップデート、productionビルド時にエラーメッセージが出る場合があるのを抑制

### 2014年1月30日

**v0.9.2** ignorecompilejs, ignorecompilecss, credential オプションを追加

### 2014年1月05日

**v0.8.9** removedirプラグインを追加。LESSコンパイラでエラー検知できないメッセージがあるのに対応。

### 2013年12月06日

**v0.8.7** LESS、Sass、CoffeeScriptで公式コンパイラを使用できるように。デフォルトでは自動検知する。

### 2013年12月05日

**v0.8.5** Linuxで動作するように対応。ただしJavaScript構文チェックは動作しない。

### 2013年12月04日

**v0.8.4** {$_top}変数を追加。相対的にトップフォルダを指定できます。

### 2013年12月03日

[ChatWork Creator's Note](http://c-note.chatwork.com/post/68781816704/phest-php-easy-static-site-generator)にてPhestの正式公開開始

### 2013年11月20日

SmartBuilderからPhestに名称変更

### 2013年10月05日

[俺聞け6 in Tokyo](http://www.msng.info/archives/2013/09/orekike6-schedule.php)にて[プレビュー公開](http://www.slideshare.net/mskmasaki/web-26886030)(旧名:SmartBuilder)


Phest v.0.10.0
166 changes: 90 additions & 76 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ Smarty http://www.smarty.net/
/**
* Project: Smarty: the PHP compiling template engine
* File: Smarty.class.php
* SVN: $Id: Smarty.class.php 4742 2013-06-17 13:30:49Z Uwe.Tews@googlemail.com $
* SVN: $Id: Smarty.class.php 4814 2014-02-16 18:34:08Z Uwe.Tews@googlemail.com $
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -172,34 +172,43 @@ cssmin https://code.google.com/p/cssmin/
* THE SOFTWARE.
* --
*
* @package CssMin
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla <joe.scylla@gmail.com>
* @copyright 2008 - 2011 Joe Scylla <joe.scylla@gmail.com>
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version 3.0.1
* @package CssMin
* @link http://code.google.com/p/cssmin/
* @author Joe Scylla <joe.scylla@gmail.com>
* @copyright 2008 - 2011 Joe Scylla <joe.scylla@gmail.com>
* @license http://opensource.org/licenses/mit-license.php MIT License
* @version 3.0.1
*/

CoffeeScript PHP https://github.com/alxlit/coffeescript-php
-----------------------------------------------------------
/**
* @package CoffeeScript
* @author Alex Little
* @license MIT
* @homepage http://github.com/alxlit/coffeescript-php
*/
Copyright (c) 2011 Jeremy Ashkenas, Alex Little

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

lessphp http://leafo.net/lessphp/

less.php https://github.com/Mordred/less.php
-----------------------------------------------------------
/**
* lessphp v0.4.0
* http://leafo.net/lessphp
*
* LESS CSS compiler, adapted from http://lesscss.org
*
* Copyright 2013, Leaf Corcoran <leafot@gmail.com>
* Licensed under MIT or GPLv3, see LICENSE
*/
less.php was originally ported to php by [Matt Agar](https://github.com/agar) and then updated by [Martin Jantošovič](https://github.com/Mordred).

scssphp http://leafo.net/scssphp/
-----------------------------------------------------------
@@ -255,49 +264,44 @@ software, even if advised of the possibility of such damage.

PHP Textile http://txstyle.org/article/36/textile-versions
-----------------------------------------------------------
Copyright (c) 2003-2004, Dean Allen <dean@textism.com>
All rights reserved.

Thanks to Carlo Zottmann <carlo@g-blog.net> for refactoring
Textile's procedural code into a class framework.

Additions and fixes Copyright (c) 2006 Alex Shiels https://twitter.com/tellyworth
Additions and fixes Copyright (c) 2010 Stef Dawson http://stefdawson.com/
Additions and fixes Copyright (c) 2010-13 Netcarver https://github.com/netcarver
Additions and fixes Copyright (c) 2011 Jeff Soo http://ipsedixit.net/
Additions and fixes Copyright (c) 2012 Robert Wetzlmayr http://wetzlmayr.com/
Additions and fixes Copyright (c) 2012-13 Jukka Svahn http://rahforum.biz/

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of the Textile nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/**
* Textile - A Humane Web Text Generator
*
* Copyright (c) 2003-2004, Dean Allen <dean@textism.com>
* All rights reserved.
*
* Thanks to Carlo Zottmann <carlo@g-blog.net> for refactoring
* Textile's procedural code into a class framework
*
* Additions and fixes Copyright (c) 2006 Alex Shiels http://thresholdstate.com/
* Additions and fixes Copyright (c) 2010 Stef Dawson http://stefdawson.com/
* Additions and fixes Copyright (c) 2010-13 Netcarver http://github.com/netcarver
* Additions and fixes Copyright (c) 2011 Jeff Soo http://ipsedixit.net
* Additions and fixes Copyright (c) 2012 Robert Wetzlmayr http://wetzlmayr.com/
* Additions and fixes Copyright (c) 2012-13 Jukka Svahn http://rahforum.biz/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name Textile nor the names of its contributors may be used to
* endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

debuglib for PHP5 http://phpdebuglib.de
-----------------------------------------------------------
@@ -331,18 +335,28 @@ debuglib for PHP5 http://phpdebuglib.de
*/


Spyc http://code.google.com/p/spyc/
Symfony Yaml Component https://github.com/symfony/Yaml
-----------------------------------------------------------
/**
* Spyc -- A Simple PHP YAML Class
* @version 0.5
* @author Vlad Andersen <vlad.andersen@gmail.com>
* @author Chris Wanstrath <chris@ozmm.org>
* @link http://code.google.com/p/spyc/
* @copyright Copyright 2005-2006 Chris Wanstrath, 2006-2011 Vlad Andersen
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @package Spyc
*/
Copyright (c) 2004-2014 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


AWS SDK for PHP 2 http://docs.aws.amazon.com/aws-sdk-php/guide/latest/index.html
-----------------------------------------------------------
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<img src="https://raw.github.com/chatwork/Phest/master/docs/image/common/logo/logo_phest_white.png"/>

Phestとは
Phest v.0.10.0
============

Phest (フェスト) はPHPでできた、デザイナ向けの静的サイトジェネレーターです。
(Phest = **PH**P **E**asy **St**atic Site Generator)
(Phest = <strong>PH</strong>P <strong>E</strong>asy <strong>St</strong>atic Site Generator)

静的サイトジェネレーターとは、テンプレートなどプログラム的な処理を実行し、HTMLファイルとして書き出すツールのことです。
[Amazon S3](http://aws.amazon.com/jp/s3/)でのホスティングやGitHub Pagesなど、静的ページしか使えないような環境向けのサイト作りに便利です。
@@ -18,7 +18,6 @@ ChatWork社内で実際にサイト制作に使用しているツールである
特徴
============

### 黒い画面不要!デザイナ向けのツールです。

<img src="https://raw.github.com/chatwork/Phest/master/docs/image/ja/capture/phest_gui.png" style="width:80%;height:80%" />

@@ -27,41 +26,35 @@ PhestはPHPさえ動けば、ブラウザによるGUI操作が可能でターミ
ファイルの自動更新検知もコマンドを実行する必要はなく、ブラウザ側から実行でき、更新をブラウザのデスクトップ通知でリアルタイムに通知します。
(※デスクトップ通知は対応しているブラウザのみ。Chrome/Firefox/Safari/Opera など)

### Smartyのテンプレートから静的HTMLファイルを生成できる
Smartyの `{include file=""}``{if}` `{foreach}` をはじめとした強力で柔軟なテンプレート構文が使用できます。
共通ヘッダやフッタなどを簡単に記述可能です。
`index.tpl` をファイル作成すると、`index.html` として生成されるイメージです。(フォルダ構造も自由に作成可能)

### CSS/JSプリプロセッサ、minifyを実行可能
静的ファイルの書き出しにともなって、LESS/SCSS/CoffeScriptなどのコンパイル、圧縮処理(minify)を実行できます。
JavaScriptファイルは自動で構文チェックが行われ、セミコロン忘れ、オブジェクト要素の最後のカンマなどを指摘してくれます。
なお、圧縮処理は時間がかかるため本番環境用ビルドでのみ実行されます。

### YAMLで記述した変数定義を使用することが可能
簡易なデータ記述言語である[YAML](http://ja.wikipedia.org/wiki/YAML)で変数を定義することができます。
ベースレイアウトを記述したテンプレートの、`<title>` タグの中身をページごとに変更したり、
フォルダ階層ごとにレイアウトを変えたり、配列を定義してSmartyの `{foreach}` で回して一括展開することも可能です。

### sitemap.xmlを自動生成
ページ一覧を記述した検索エンジン用のsitemap.xmlを自動生成します。
また、sitemap.xmlのパスを記述したrobots.txtも自動生成します。

### Amazon S3へ簡単にデプロイ可能
ビルドしたファイルをAmazon S3の特定バケットに一括デプロイ(リリース)できる仕組みがあります。
S3側にアップされていて、ローカルにないファイルはS3側から自動で削除するなどファイルの同期も可能です。

### ローカル環境用と、本番環境用で別々に生成が可能
ローカル環境時はドメインをlocalhostにして、本番用にはドメインを本番サーバーにしたバージョンで生成など、
環境に応じたファイル生成が柔軟に可能。watch機能によりファイルの変更を検知して自動でビルドを実行することもできます。

### HTMLメールの生成などにも便利
encodeオプションでJISコードに文字コード変換して生成させることもできます。

インストール
============

PHP5.3以上がインストールされている必要があります。
Windowsでは[XAMPP](http://www.apachefriends.org/jp/xampp.html)、Macでは[MAMP](http://www.mamp.info/en/index.html)が簡単にインストールできるのでオススメです。
LinuxでもPHPが動けば基本動作しますが、JavaScriptの構文チェックは動作しませんのでご注意ください。(今後対応予定)
また、ツール内部でGoogle Closure Compilerを実行するためJavaの実行環境が必要です。

PHPが稼働するドキュメントルート以下(通常 `htdocs/``www/``public_html/` など)に、リポジトリ内のデータをコピーするだけでokです。
@@ -86,3 +79,4 @@ LICENSE

Licensed under MIT, see [LICENSE](https://github.com/chatwork/Phest/blob/master/LICENSE)


4 changes: 2 additions & 2 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -32,15 +32,15 @@ <h1 id="_logo">
<li><a href="s3deploy.html">Amazon S3へのデプロイ<i class="icoFontArrowChevronRight"></i></a></li>
<li><a href="i18n.html">多言語対応<i class="icoFontArrowChevronRight"></i></a></li>
<li><a href="plugins.html">プラグイン<i class="icoFontArrowChevronRight"></i></a></li>
<li><a href="changelogs.html">変更履歴 (12/04)<i class="icoFontArrowChevronRight"></i></a></li>
<li><a href="changelogs.html">変更履歴 (4/10)<i class="icoFontArrowChevronRight"></i></a></li>
</ul>
</div>
<div id="_mainContent" class="mainContent">
<div class="mainContentInner">
<h1>ページが見つかりません</h1>
</div>
<div id="_footer" class="footer clearfix">
<small>(c) 2013 <a href="http://www.chatwork.com/ja/company" target="_blank">ChatWork</a></small>
<small>(c) 2014 <a href="http://www.chatwork.com/ja/company" target="_blank">ChatWork</a></small>
</div>
</div>
</div>
Loading