4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Playでファイルの更新を監視して、自動でコンパイルする

Posted at

自動監視コンパイル

//playのコンソールモードに入ってから下記を入力
~compile

先日のplay勉強会で教わりました(http://blog.greative.jp/archives/627)。
通常は、編集して保存したのち、リクエストを送ってはじめてコンパイルされますが、そのときにラグがあります。
下記のコマンドを流しておけば、保存した瞬間にコンパイルされるので、少しラグが緩和されます。

実際の使い方

auto_compile
% play
[info] Loading project definition from /Users/path/to/test/project
[info] Set current project to test (in build file:/Users/path/to/test/)
       _            _ 
 _ __ | | __ _ _  _| |
| '_ \| |/ _' | || |_|
|  __/|_|\____|\__ (_)
|_|            |__/ 
             
play! 2.0.1, http://www.playframework.org

> Type "help play" or "license" for more information.
> Type "exit" or use Ctrl+D to leave this console.

[test] $ ~compile//←これ!!!
[info] Updating {file:/Users/path/to/test/}test...
[info] Done updating.                                                                  
[info] Compiling 5 Scala sources and 1 Java source to /Users/path/to/test/target/scala-2.9.1/classes...
[success] Total time: 24 s, completed 2012/06/20 10:33:53
1. Waiting for source changes... (press enter to interrupt)
[info] Compiling 1 Scala source to /Users/path/to/test/target/scala-2.9.1/classes...
[success] Total time: 2 s, completed 2012/06/20 10:34:41
2. Waiting for source changes... (press enter to interrupt)
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?