Script to watch project's less and js files, which helps you to compile javascript and less files automatically.
Javascript files would be compiled according to the settings in build.rb
.
cp ~/path/to/watchr-watch-project/bin/watchr-project ~/bin
cp ~/path/to/watchr-watch-project/lib/*.watchr ~/lib
Open ~/.bashrc
and add the following line:
export lib=~/dev/src/lib
Open ~/lib/js.watchr
and change @js_lib_dir
path matching yours.
@js_lib_dir = ENV["lib"] + "/custom/snippets"
Open ~/lib/lessc.watchr
and change @inc_path
matchin your folder structure. This variable would be --include-path
option for lessc
command
@inc_path = [
".",
ENV["lib"] + "/css",
ENV["lib"] + "/javascript" ].join(":")
Create your project under WEB_ROOT path and execute this command:
watchr-project ABS_PATH_TO_PROJECT