Skip to content

Comments

Use NPM for management of client side dependencies#942

Merged
jtojnar merged 7 commits intomasterfrom
npm-deps
Jun 15, 2017
Merged

Use NPM for management of client side dependencies#942
jtojnar merged 7 commits intomasterfrom
npm-deps

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.

jtojnar added 5 commits June 9, 2017 05:14
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
jtojnar added 2 commits June 15, 2017 13:23
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
@jtojnar jtojnar merged commit 5e56ae1 into master Jun 15, 2017
@jtojnar jtojnar deleted the npm-deps branch June 15, 2017 11:30
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