LoginSignup
2
2

More than 5 years have passed since last update.

grunt-templateを開発するときの工夫いろいろ

Posted at

最近、けっこう頻繁にgrunt-templateを作るようになってきた。

じみに決まりが多かったり、動作確認がしづらかったり、
grunt-templateはいろいろ開発しづらい要素満載なので、

そのあたりを楽にする工夫を色々考えている。

なにはともあれ、シンボリックリンク

ln -s ~/Project/grunt-init-hogehoge ~/.grunt-init/hogehoge

これをやっておけば、
まだ開発用のディレクトリに置いてあるgrunt-template、「hogehoge」でも、
grunt-initができるようになる。

シンボリックリンクさいきんすごいよくつかう。

reset.sh

template作るときに面倒なのが、

  • templateにミスが見つかった!
  • なおす
  • grunt-initしてみる
  • まだミスあった
  • またなおしてgrunt-initして…

というサイクル。

これを速くしたいので、最近はtemplateにreset.shっていうものをまぎれこませて開発している。

reset.sh
rm -rf *
grunt-init hogehoge
npm install
grunt build

これがあると、
動作確認用につくったprojectを、修正入れた最新のtemplateで作り直したい!
というときに、下の1行ですぐ動作可能な状態になる。

source reset.sh

べんり。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2