Skip to content

Commit 9d6473c

Browse files
committed
Compile javascript and watch changes
1 parent 0ca2a41 commit 9d6473c

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

Procfile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
esbuild: npm run watch
2+
server: bin/rails server -p 3000

bin/serve

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
overmind start

javascript/application.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ import { Application } from "@hotwired/stimulus"
55
import HelloController from "./controllers/hello_controller"
66

77
window.Stimulus = Application.start()
8-
Stimulus.register("hello", HelloController)
8+
Stimulus.register("hello", HelloController)

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@
44
"@hotwired/turbo-rails": "^7.1.1",
55
"@rails/request.js": "^0.0.6",
66
"esbuild": "^0.14.25"
7+
},
8+
"scripts": {
9+
"watch": "esbuild javascript/application.js --outfile=app/assets/javascript/playground/application.js --bundle --watch",
10+
"build": "esbuild javascript/application.js --outfile=app/assets/javascript/playground/application.js --bundle"
711
}
812
}

0 commit comments

Comments
 (0)