vtst / ow

Various Eclipse plugins for web development
http://www.normalesup.org/~simonet/soft/
74 stars 29 forks source link

How to compile the source in Eclipse ? #263

Open craph opened 7 years ago

craph commented 7 years ago

What is the process to compile the source on Eclipse ?

Amenel commented 7 years ago

First, I installed the LESS compiler as a NodeJS module.

Then, in Eclipse, I created a configuration in the External Tools toolbar button (in my Eclipse instance, that button sits next to Debug and Run).

In the Main tab, I entered the path to the lessc.cmd file: D:\Programs\nodejs\node_modules\.bin\lessc.cmd in Location.

In Working Directory, I entered the path to the root of my set of LESS files: ${workspace_loc:/projectname/src/main/resources/static/styles}

In Arguments, I have: main.less css/main.css --verbose --clean-css="--s1 --advanced --compatibility=ie8 --keep-line-breaks"

Whenever I want my changes to be reflected in the CSS file, I manually run that configuration. It takes two clicks. From some documentation that I read, one can also have the compiler watch the files (or the folder) and automatically compile the set of files each time one is modified, but I was not interested in that feature at that moment.