Dev "on the fly"


#1

Hi,

Question about SCSS dev (in order to hack a little bit the too dark standard theme), running Vagrant:

Should I run the bin/rails assets:precompile command after each SCSS modification?

I thought that it was previously done automatically (but I may be wrong).


#2

You don’t need to recompile in the development environment (RAILS_ENV unset or set to development). There should be live reloading via webpack-dev-server.


#3

Ok thank’s for the response.

I check and I’m in DEV mode:

vagrant@mastodon:/vagrant$ foreman start
14:08:32 web.1     | started with pid 3425
14:08:32 sidekiq.1 | started with pid 3426
14:08:32 stream.1  | started with pid 3428
14:08:32 webpack.1 | started with pid 3430
14:08:34 web.1     | [3427] Puma starting in cluster mode...
14:08:34 web.1     | [3427] * Version 3.9.1 (ruby 2.4.1-p111), codename: Private Caller
14:08:34 web.1     | [3427] * Min threads: 5, max threads: 5
14:08:34 web.1     | [3427] * Environment: development
14:08:34 web.1     | [3427] * Process workers: 2
14:08:34 web.1     | [3427] * Preloading application
14:08:34 stream.1  | yarn run v0.27.5
14:08:34 webpack.1 | yarn run v0.27.5
14:08:35 stream.1  | $ node ./streaming/index.js
14:08:35 webpack.1 | $ "/vagrant/node_modules/.bin/webpack-dev-server" "--progress" "--color" "--config" "/vagrant/config/webpack/development.js" "--host" "0.0.0.0"
14:08:37 stream.1  | info Starting streaming API server master with 1 workers
14:08:38 stream.1  | info Starting worker 1
14:08:38 stream.1  | info Worker 1 now listening on :::4000
14:08:40 sidekiq.1 | 2017-09-04T14:08:40.484Z 3429 TID-45i80 INFO: Booting Sidekiq 5.0.3 with redis options {:url=>"redis://localhost:6379/0", :id=>"Sidekiq-server-PID-3429"}
14:08:41 web.1     | [3427] * Listening on tcp://0.0.0.0:3000
14:08:41 web.1     | [3427] Use Ctrl-C to stop

I think that I have something wrong in my Vagrant setup as any modification in a SCSS file is not recompiled “on the fly”. But as I didn’t modify anything in the provided Vagrant conf, I’m a little bit confused about this issue!