ver 0.5あたり
webpackとgulpを同時起動し各ファイルをコンパイルするテンプレート自分用。 Three.jsバージョン
$ npm run start
- start-serve : browser-sync
- webpack-watch : webpack(babel)
- gulp
- pug
- sass
-
- bourbon
$ npm webpack-watch
などで単体起動も可能。
gulp, webpack, browser-syncを平行起動、gulpとwebpackでhtml, cssまたはjsを監視、コンパイルし保存。コンパイル済みのファイルをbrowser-syncで監視してブラウザをリロードする。
/src/pug/**/*.pug
/src/sass/**/*.scss
をコンパイルしてdist以下にディレクトリを維持したまま保存
/src/js/app.js
をコンパイルし, /dist/app.bundle.jsとして保存
jqueryなどはvendorとしてchunkを保存、色々してあるのでimportしないでも動くかもしれない。
サーバーを管理し、/dist/ディレクトリにあるコンパイル済みのhtml, css, jsのみを監視してブラウザーをリロード