LoginSignup
2
2

More than 3 years have passed since last update.

live-serverとPureScriptを使ったホットリロード開発手順メモ

Posted at

準備

$ mkdir rensyu
$ cd rensyu
$ pulp init
$ pulp browserify --to dist/index.js
package.json
{
  "dependencies": {
    ....
  },
  "scripts": {
    "build": "pulp build && pulp browserify --to dist/index.js"
  }
}
dist/index.html
<!DOCTYPE html>
<html lang="en">
<head>
   <meta charset="UTF-8">
   <title></title>
</head>
<body>
   <script src="./index.js"></script>
</body>
</html>
$ live-server dist/

開発

以下のいずれかの方法でビルドすれば勝手にブラウザがリロードされます。

$ yarn build

または

$ npm run build
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