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.3k
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
Next.js App Router登場後の話
sunnyone
0
23
はやい開発のためのJSONデータ型の活用
sunnyone
0
79
フロントエンドトレンドのふりかえりと事業に合わせた選択
sunnyone
0
75
メタプログラミングとは
sunnyone
0
2k
RustからPythonを呼び出す
sunnyone
1
4k
Other Decks in Technology
See All in Technology
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
14
35k
"好き"との生活/Regularly update profile with GitHub Actions
judeeeee
0
150
SREとその組織類型
tatsuo48
8
1.5k
Google Cloud の AI を支える裏側のインフラを垣間見る!
maroon1st
0
190
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
110
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
1
300
クラウドサインにおけるプロダクトマネージャーの役割と開発プロセス / 20240410_cloudsign-PdM
bengo4com
1
680
コンパウンドスタートアップのためのスケーラブルでセキュアなInfrastructure as Codeパイプラインを考える / Scalable and Secure Infrastructure as Code Pipeline for a Compound Startup
yuyatakeyama
3
2.4k
Postman v10リリース後を振り返る
nagix
0
130
小さな開発会社がWebサービスを作る理由
polidog
PRO
1
160
入社後初めてのタスクでk8sアップグレードした話.pdf
kkato1
1
380
Four keys改善の取り組み事例紹介
sansantech
PRO
3
230
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
11
4.6k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Design by the Numbers
sachag
274
18k
Making Projects Easy
brettharned
108
5.5k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Into the Great Unknown - MozCon
thekraken
10
980
Building Applications with DynamoDB
mza
88
5.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
990
4 Signs Your Business is Dying
shpigford
175
21k
Making the Leap to Tech Lead
cromwellryan
123
8.5k
Bootstrapping a Software Product
garrettdimon
PRO
301
110k
Building Your Own Lightsaber
phodgson
98
5.7k
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
ご清聴ありがとうございました