KScript ドキュメント
JA

言語

英語から自動翻訳されています。原文は英語です。

変更点

コマンドになった文

アクションはコマンドなので、その結果を式で使用できます。

以前 今
write文 @write_text(path, text)、@append_text(path, text)、@write_json(path, value)(KScript.IO)
move文とcopy文 @move(from, to)、@copy(from, to)(KScript.IO)
delete文 @delete(path)(KScript.IO)
mkdir文 @create_folder(path)(KScript.IO)
assert文 @assert(condition, message?)(KScript.Test)
stylesheet文 @stylesheet(path, vars?)、CSSを返します:@write_text('site.css', @stylesheet('theme.ks.css'))(KScript.Style)
dispatch文 ジョブ自身のメソッド:SendWelcome(user_id: 7)->dispatch()。delay:、at:、queue:、connection:を併用します(KScript.Queue)
download文 @download(url, to)、保存したファイルのパスを返します(KScript.Net)
redirect文 コントローラーではreturn @redirect(/thanks)(KScript.Http)、ページでは<respond redirect="/thanks" />