Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NPM for management of client side dependencies #942

Merged
merged 7 commits into from
Jun 15, 2017
Merged

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Jun 8, 2017

The JavaScript client depends on several libraries, which are currently tracked in our repository. This makes keeping up with updates unnecessarily complicated and pollutes the repository.

In the past we faced the same problem with PHP dependencies and we solved it using Composer. For JavaScript, Bower and NPM are two most common package managers. Initially, Bower was used for its use of flat dependency tree but in the end NPM prevailed because it is much more common in distribution repositories.

As with Composer, nothing changes for normal user; developers will be forced to update the dependencies on checkout.

jQuery UI is not actually used.
The JavaScript client depends on several libraries, which are currently
tracked in our repository. This makes keeping up with updates unnecessarily
complicated and pollutes the repository.

In the past we faced the same problem with PHP dependencies and we solved it
using Composer. For JavaScript, Bower and NPM are two most common package
managers. Initially, Bower was used for its use of flat dependency tree
but in the end NPM prevailed because it is much more common in distribution
repositories.

This patch modifies the build script to install the dependencies and moves
jQuery dependency to the new system. Other dependencies have yet to come.

As with Composer, nothing changes for normal user; developers will be forced
to update the dependencies on checkout.
In addition to jQuery, we are now also installing the following packages:

* malihu custom scrollbar plugin
* jQuery Hotkeys
* jQuery Mousewheel
The list of assets is now used in both index.php and gruntfile.
To make sharing the data easier it was moved to JSON file.
@jtojnar jtojnar force-pushed the npm-deps branch 2 times, most recently from 2276a29 to 124a595 Compare June 9, 2017 12:20
FancyBox was the last of the third party JavaScript libraries. Since
the official NPM package only offers the new major version, selfoss
was also upgraded to use it. As a bonus, long standing issue with
keyboard shortcuts was fixed.

Closes: #796
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant