研究室のWebサイト
dist
: 実際に公開するファイルを入れておく.npm run build
するとここが更新される.npm run watch
しても同様.npm run publish
すると公開できる.
sass
: cssを便利に書けるsass
のファイルを入れるところpages
: htmlを便利に書けるnunjucks
のファイルを入れるところfont
: フォントを入れるところjs
: JSファイルを入れるところimage
: 画像を入れるところ
node_modules
: node.jsのパッケージがインストールされる場所
- Node.jsいれましょう
- gitいれましょう
- 各位ググってくれ!!
- nodebrewを使うのがおすすめ
- Macの人はHomebrewを入れて...
$ brew install nodebrew
$ nodebrew install latest
$ nodebrew use latest
$ node -v
- これでちゃんとバージョンが出ればOK
- Macの人はgit入ってるはず.
$ git clone [email protected]:keitalab/website.git
- 開発に必要なあれこれをいれよう.
- gulpなど諸々がはいります.
$ npm i
これで準備完了!
$ npm run watch
- 適当に編集.
$ git push origin master
a. 自動でwerckerがpushします
npm run watch
: ファイルの変更を監視して保存したらhtmlとかcss生成npm run nunjucks
:pages/
の中身をhtmlとして変換しルートに置くnpm run sass
:sass/
の中身をhtmlとして変換しcss/
に置くnpm run build
:dist/
の中身を更新
npm run dev
: 開発用npm run watch
の機能をベースにlive-reload
できるようにする