I think using rails pipeline makes it easier to handle dependencies. We need to package it separately in debian as minified javascripts should have their corresponding source in the archive.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
Similar, yes, but it's still an additional external dependency. @dzaporozhets doesn't like us to use GitHub forks in the Gemfile for similar reasons, but let's see what he thinks.
My personal opinion, I think rails-assets.org is awesome and would help us manage our non-Ruby dependencies, but I also get why can't/shouldn't.
@pravi@rspeicher I am against relying on one more service for bundle install. It is enough troubles when rubygems.org has availability problems. I don't want to have extra SaaS dependency. Especially because GitLab is self-hosted solution. Until there is a superior advantage I rather keep our JS libs on rubygems and inside vendor.
@dzaporozhets can there be a simple way of knowing versions of the assets? How about using the format given below?
jquery.nicescroll.js will be a symbolic link to jquery.nicescroll.js-version.js
This way, we can easily find out if the javascripts packaged in debian is in sync with gitlab or not. Currently if we have to find the version of the vendored assets, the only way is to open it and for some minified js files, that is also not possible.
@pravi yes but GitLab application will compress, minify and concatenate all JS in one file. Why do we need to change this behaviour for debian package?
@dzaporozhets that behaviour will not change. rake assets:precompile will be run during package installation. We are talking about linking packaged js files to vendor directory instead of using embedded js files (before we run rake assets:precompile) when we already have the js file packaged or is a minified js (for minified js, we package it and the link it).
@dzaporozhets that would be great help. Also if we can add version numbers to the vendored files and making a symbolic link without version will help us track those who are already packaged (avoid duplication).
An example given below,
pravi@pirate:~/gitlab/vendor/assets/javascripts$ ls -l jquery.endless-scroll*-rw-r--r-- 1 pravi pravi 4989 Jan 14 18:14 jquery.endless-scroll-1.4.8.jslrwxrwxrwx 1 pravi pravi 30 Jan 19 11:39 jquery.endless-scroll.js -> jquery.endless-scroll-1.4.8.jspravi@pirate:~/gitlab/vendor/assets/javascripts$
This is how so files are handled in /usr/lib
$ ls -l /usr/lib/libzip.so.1*lrwxrwxrwx 1 root root 15 May 10 2010 /usr/lib/libzip.so.1 -> libzip.so.1.0.0-rw-r--r-- 1 root root 43616 May 10 2010 /usr/lib/libzip.so.1.0.0
Also if we can add version numbers to the vendored files and making a symbolic link without version will help us track those who are already packaged (avoid duplication).
@pravi It would be hard to maintain and remember to follow this pattern. We want to keep development as easy as possible. So I would rather just use non-minified version of files in vendor.
@dbalexandre can you replace js files in vendor/assets/javascripts that are minified with non-minified version this week?
@dbalexandre You can take over my MR I mentioned above. Be sure that we replace the minified scripts with the same release versions so we're not breaking anything at the same time.