alanshaw / alanshaw/grunt-include-replace

Allow undeclared parameters to be defaulted

オープン
#66 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
199
フォーク
43
PR マージ指標
30日以内にマージされた PR はありません

説明

It would be really useful if you could set any null parameters to a default value. For instance:

snippet.html could contain:

``` html

@@one


@@two


```

And be included via:
`@@include("snippet.html", {"one":"text"})`

Currently, as nothing is passed in for `@@two` this will will display:

``` plain
text
@@two
```

It would be nice to be able to define a default value for parameters, so any missing parameters can be treated as a blank string by default (or have some default text entered) rather than showing the unused `@@` variable in the output.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。