LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-11-2021, 11:25 PM   #1
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,285

Rep: Reputation: 44
Question 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?
 
Old 11-12-2021, 01:09 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,224
Blog Entries: 1

Rep: Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585
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.
 
Old 11-12-2021, 07:42 AM   #3
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,285

Original Poster
Rep: Reputation: 44
Post

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.
 
Old 11-12-2021, 07:45 AM   #4
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,285

Original Poster
Rep: Reputation: 44
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.
 
Old 11-12-2021, 07:57 AM   #5
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 1,782

Rep: Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456
Quote:
Originally Posted by dedec0 View Post
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.

 
1 members found this post helpful.
Old 11-12-2021, 08:03 AM   #6
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,224
Blog Entries: 1

Rep: Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585Reputation: 1585
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.
 
Old 11-12-2021, 08:31 AM   #7
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,285

Original Poster
Rep: Reputation: 44
Exclamation

Quote:
Originally Posted by boughtonp View Post
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.
 
Old 11-12-2021, 08:45 AM   #8
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 1,782

Rep: Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456Reputation: 1456
Quote:
Originally Posted by dedec0 View Post
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)


Last edited by boughtonp; 11-12-2021 at 08:46 AM.
 
1 members found this post helpful.
Old 11-12-2021, 08:55 AM   #9
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,285

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by NevemTeve View Post
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.
 
Old 11-12-2021, 09:03 AM   #10
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,285

Original Poster
Rep: Reputation: 44
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.
 
Old 11-12-2021, 10:18 AM   #11
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,188

Rep: Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752Reputation: 4752
Whoa there are a LOT of ads on their homepage…

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

Last edited by dugan; 11-12-2021 at 10:23 AM.
 
Old 11-12-2021, 10:21 AM   #12
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,285

Original Poster
Rep: Reputation: 44
Quote:
Originally Posted by dugan View Post
Whoa there are a LOT of ads on their homepage.
9 years of ad revenue based on abandoned open source project, maybe?
 
  


Reply

Tags
css, javascript, minify


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Top open source projects in 2018, open source hardware, donation model for sustaining open source projects, and more news LXer Syndicated Linux News 0 10-27-2018 07:12 PM
LXer: Mozilla awards $500K to open source projects, Rome increases its use of FOSS, and more news LXer Syndicated Linux News 0 10-15-2017 04:54 AM
LXer: How to compress and minify CSS and JavaScript from the command line LXer Syndicated Linux News 0 01-04-2014 12:42 AM
LXer: FOSS+CSS: Closed Source DOS Accounting Meets Linux and DOSEMU LXer Syndicated Linux News 0 02-04-2013 07:42 AM
LXer: TLWIR 32: Open Sparks Fly, FOSS Players Give Open Advice, and FOSS Petition Gets Key Endorseme LXer Syndicated Linux News 0 02-06-2012 12:21 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration