1602 / 1602/ejs-ext

templates directory per project

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

説明

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 ;-)

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

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

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
tooling
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
70/100

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

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