Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PowerShellでRazorテンプレートエンジンを使ってみた
Search
sunnyone
July 12, 2014
Technology
0
2.7k
PowerShellでRazorテンプレートエンジンを使ってみた
第 3 回 PowerShell 勉強会でのLTの資料です。
http://d.sunnyone.org/2015/04/powershellrazor.html
sunnyone
July 12, 2014
Tweet
Share
More Decks by sunnyone
See All by sunnyone
開発者とのコミュニケーションのはじめかた
sunnyone
0
5
概念モデル→論理モデルで気をつけていること
sunnyone
3
360
印象に残ったLLMの使い方5選
sunnyone
0
20
シンプルじゃないテーブルの見つけ方
sunnyone
1
350
Next.js App Router登場後の話
sunnyone
0
71
はやい開発のためのJSONデータ型の活用
sunnyone
0
160
フロントエンドトレンドのふりかえりと事業に合わせた選択
sunnyone
0
110
メタプログラミングとは
sunnyone
0
2.4k
RustからPythonを呼び出す
sunnyone
1
4.5k
Other Decks in Technology
See All in Technology
SwiftUIのGeometryReaderとScrollViewを基礎から応用まで学び直す:設計と活用事例
fumiyasac0921
0
140
BirdCLEF+2025 Noir 5位解法紹介
myso
0
190
about #74462 go/token#FileSet
tomtwinkle
1
290
"複雑なデータ処理 × 静的サイト" を両立させる、楽をするRails運用 / A low-effort Rails workflow that combines “Complex Data Processing × Static Sites”
hogelog
3
2k
Trust as Infrastructure
bcantrill
0
330
extension 現場で使えるXcodeショートカット一覧
ktombow
0
210
「AI駆動PO」を考えてみる - 作る速さから価値のスループットへ:検査・適応で未来を開発 / AI-driven product owner. scrummat2025
yosuke_nagai
4
590
stupid jj tricks
indirect
0
7.9k
KMP の Swift export
kokihirokawa
0
330
KAGのLT会 #8 - 東京リージョンでGAしたAmazon Q in QuickSightを使って、報告用の資料を作ってみた
0air
0
200
コンテキストエンジニアリングとは? 考え方と応用方法
findy_eventslides
4
900
Where will it converge?
ibknadedeji
0
180
Featured
See All Featured
For a Future-Friendly Web
brad_frost
180
9.9k
Code Reviewing Like a Champion
maltzj
525
40k
Building an army of robots
kneath
306
46k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
How to train your dragon (web standard)
notwaldorf
96
6.3k
How STYLIGHT went responsive
nonsquared
100
5.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
The Invisible Side of Design
smashingmag
301
51k
Raft: Consensus for Rubyists
vanstee
139
7.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
32
2.2k
Agile that works and the tools we love
rasmusluckow
331
21k
Transcript
PowerShell で Razor テンプレートエンジンを 使ってみた @_sunnyone
こんなことありませんか? • ちょっとだけ違うテキストをよく生成する – メールの雛形とか • PowerShell の変数でいけるがテキスト内部での制御 が難しい –
変数の値によって出したり出さなかったり Razor テンプレートエンジンを使ってみた
Razorとは • テンプレートエンジン • ASP.NET MVCとセットで利用される http://shiba-yan.hatenablog.jp/entry/20110317/1300294985 ASP.NET MVC 3
開発入門 (12) - Razor の文法 – しばやん雑記 http://haacked.com/archive/2011/01/06/razor-syntax-quick-reference.aspx
RazorEngine モジュール • 素のままでは手続きが不便 • RazorEngine というヘルパーライブラリがある – https://razorengine.codeplex.com/ –
https://github.com/Antaris/RazorEngine RazorEngineをPowerShellから使う
RazorEngineをPowerShellで - 準備 • 適当なフォルダにnuget.exeでインストール > cd proj\razortest > nuget.exe
install RazorEngine
RazorEngineをPowerShellで - スクリプト 詳細はISEで 2015/4/23追記 https://gist.github.com/sunnyone/e6948988a8e125b779ba
ご清聴ありがとうございました