alanshaw / alanshaw/grunt-include-replace

Allow undeclared parameters to be defaulted

Abierto
#66 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
199
Forks
43
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.