LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Open source projects are bad FOSS if they minify .js and .css files? (https://www.linuxquestions.org/questions/programming-9/open-source-projects-are-bad-foss-if-they-minify-js-and-css-files-4175703462/)

dedec0 11-11-2021 10:25 PM

Open source projects are bad FOSS if they minify .js and .css files?
 
Open source projects are bad FOSS if they minify .js and .css files?

I have a poor knowledge in javascript, and a small knowledge in Cascading Style Sheets. But I have found a project that is open source, but has a main part which is javascript. But this javascript file has a name similar to core.min.js . And the CSS files are also minified.

Is there a way to see the original files with open source projects? Or should I use a solution equal or similar to what is described in this StackOverflow question?

NevemTeve 11-12-2021 12:09 AM

I think you mean obfuscation or some sort of compression (e.g. leave unnecessary whitespaces).
By definition such obfuscated/compressed files aren't source-file (as they are generated programmaticaly from the source) so maybe these projects aren't open source on the first place.

dedec0 11-12-2021 06:42 AM

The project says it is open source, and it has its source (or part of it, given those *.min.* files) stored in sourceforge.net and github too.

The project in question is phpFreeChat.

dedec0 11-12-2021 06:45 AM

I wanted to adjust and change some detail of the project, but they are generated by the javascript, so, it is just locked, for me. The only way found is doing something like those suggested in that StackOverflow question, before.

boughtonp 11-12-2021 06:57 AM

Quote:

Originally Posted by dedec0 (Post 6300555)
I have a poor knowledge in javascript, and a small knowledge in Cascading Style Sheets. But I have found a project that is open source, but has a main part which is javascript. But this javascript file has a name similar to core.min.js . And the CSS files are also minified.

The source code for phpFreeChat is not minified (except for two third-party libraries) - that step occurs in the build process.

It would be easy enough to edit the Makefile to change this into simple concatenation.


NevemTeve 11-12-2021 07:03 AM

I've just downloaded the source from github (git@github.com:kerphi/phpfreechat.git) and found these files:
Code:

./client/lib/jquery-1.8.2.min.js
./client/lib/less-1.3.0.min.js
./client/lib/less-1.3.1.min.js

Are you referring to these? I'd say they aren't part of this project, just used as external libraries.

dedec0 11-12-2021 07:31 AM

Quote:

Originally Posted by boughtonp (Post 6300682)
The source code for phpFreeChat is not minified (except for two third-party libraries) - that step occurs in the build process.

It would be easy enough to edit the Makefile to change this into simple concatenation.

Then I did not understand where and how the project is works. My starting point is a working setup of it. In the HTML source, I see ../client/jquery.phpfreechat.min.js

So, I searched for this file in the source directory, and it is there. I searched other files with "phpfreechat" in them:

Code:

./examples/theme_phpfreechat.html
./client/themes/default/jquery.phpfreechat.min.css
./client/themes/carbon/jquery.phpfreechat.min.css
./client/themes/gamer/jquery.phpfreechat.min.css
./client/themes/phpfreechat
./client/themes/phpfreechat/jquery.phpfreechat.min.css
./client/jquery.phpfreechat.min.js

Now... I did not look in the Makefile... let me do that... just a few minutes.

boughtonp 11-12-2021 07:45 AM

Quote:

Originally Posted by dedec0 (Post 6300699)
My starting point is a working setup of it.

For some software, the distribution/release is also the source, but that's often not the case.

Generally the readme* should make this clear - the one for phpfreechat is distinctly lacking in that respect.

*(or various uppercased-filename text files in some older projects)


dedec0 11-12-2021 07:55 AM

Quote:

Originally Posted by NevemTeve (Post 6300684)
I've just downloaded the source from github (git@github.com:kerphi/phpfreechat.git) and found these files:
Code:

./client/lib/jquery-1.8.2.min.js
./client/lib/less-1.3.0.min.js
./client/lib/less-1.3.1.min.js

Are you referring to these? I'd say they aren't part of this project, just used as external libraries.

No. I was referring to the js and css files that have "phpfreechat" in their names, which I listed in the other post.

dedec0 11-12-2021 08:03 AM

A makefile more complex than what I can understand, in a few aspects
 
A makefile more complex than what I can understand, in a few aspects. I will look at it more calmly. I need more time to clean and/or make it easier to read and understand, each step.

If any of you make a comment that can be useful as what the project's README.md lacks, in aspects of who develops things for it, will be much welcome. I will use use it, and give the credits, of course.

dugan 11-12-2021 09:18 AM

Whoa there are a LOT of ads on their homepage…

Anyway, the js files in their GitHib repo aren’t minified.

dedec0 11-12-2021 09:21 AM

Quote:

Originally Posted by dugan (Post 6300723)
Whoa there are a LOT of ads on their homepage.

9 years of ad revenue based on abandoned open source project, maybe?


All times are GMT -5. The time now is 02:01 AM.