Compiling with minify.sh

wolfbg6 years ago

Hi. I am using Traccar 3.16, Debian Stretch. There is nothing else on computer. Every thing works fine. I have read the topics mentioning minify.sh but I could not figure out what to do. I would not go through the struggles. All attempts were to no avail. Please help.
That is what I have done:

  1. Installed Debian,
  2. apt-get install default-jre,
  3. wget https://github.com/tananaev/traccar/releases/download/v3.16/traccar-linux-3.16.zip,
  4. unzip traccar-linux-3.16.zip,
  5. ./traccar.run

Every thing went well and server is working fine. Based on explanations I have read I would like to ask several questions and for help step by step. First of all, in my installation dir /opt/traccar there is no TOOLS directory. I assume I should copy the code of minify.sh from GitHub and create the file on my server. Where to put it - in /opt/traccar/web or somewhere else? Since I have clean install only of Traccar what dependences I have to download and install. Do I have to change in minify.sh the paths or anything at all? Please if it is possible to give straightforward instructions.
Thank you

Anton Tananaev6 years ago

It seems like you are mixing two things up. What we have on GitHub is full project for development purposes. When you download ZIP from website you only get packaged server with web app. You don't get any tools.

If you want to modify web app you should get repo from GitHub, not installer.

wolfbg6 years ago

Sorry. I can not mix anything because I do not know.

  1. If I clone the full project from GitHub and compile it - I get dir TOOLS and working minify.sh?
Anton Tananaev6 years ago

Are you talking about web app? How would you compile it?

wolfbg6 years ago

Obviously I should have used BUILD?

Anton Tananaev6 years ago

Unfortunately I don't understand the question. I think it's better if you explain what you are trying to do in the first place.

wolfbg6 years ago

I am changing the date format and default max zoom level from 18 to 21 in Style.js. In debug mode every thing works fine but Traccar loads very slowly. I assumed that I have to use minify.sh and then release mode will show the changes.

Anton Tananaev6 years ago

Yes, you have to:

  1. Download whole project from GitHub.
  2. Do your modifications.
  3. Compile minified version.
  4. Upload all files from web folder to your server.