1602 / 1602/ejs-ext

templates directory per project

Abierto Apto para principiantes
#2 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
4
Forks
5
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

A quick, and beautifull enhancement (;P) of a way that scaffold templates are generated. If 'YOUR_PROJECT/.templates' directory exists and template file exists inside, it will be used by scaffold generator instead of that default one from 'ejs-ext' templates directory.

``` javascript
exports.template = function (name) {
try {
stats = fs.lstatSync(process.cwd() + '/.templates/' + name + '.ejs');

if (stats.isFile()) {
return process.cwd() + '/.templates/' + name + '.ejs';
}
}
catch (e) {}

return __dirname + '/templates/' + name + '.ejs';
};
```

Sorry that it is not a pull request, but i was enlightened in some place, where i'm unabe to do that ;-)

Guía de contribución

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

Línea de trabajo

Look at the scaffold generator code in the ejs-ext project to find where templates are currently loaded. The issue provides a sample function; implement it to check for a .templates directory in the project root and fall back to the default. Test by creating a custom template in .templates and running a scaffold command to verify it's used.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
tooling
Tipo de issue
Nueva funcionalidad
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
70/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.