From version < 4.1 >
edited by Krzysztof Płachno
on 2017/08/17 16:03
To version < 5.1 >
edited by Krzysztof Płachno
on 2017/08/17 16:05
< >
Change comment: There is no comment for this version

Summary

Details

ExtensionCode.ExtensionClass[0]
Description
... ... @@ -11,5 +11,7 @@
11 11  
12 12  Let's assume that you want to import to XWiki some usefull UI JS library - [[egjs>>https://naver.github.io/egjs/]]
13 13  After installation of Extension Repository Connector - NPM, go to the "Extensions" page of the Administration. Then search for ##egjs## by choosing "All Extensions" from the drop down list filter. The result should be more less the following:
14 +{{image reference="simpleSearch.PNG" width="600px"/}}
14 14  
15 15  Then choose from the requests package from the result list and proceed to install it as you'd do for any XWiki extension:
17 +{{image reference="install.PNG" width="600px"/}}
cogExtension extending Extension Module with possibility to import any npm packages from npm registry and wrap them
TypeJAR
Categoryrepository
Developed by

Krzysztof Płachno, Thomas Mortagne

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager

Description

Npm registry is the most popular and used repository of JS packages. Inside XWiki JS libaries may be required for example in Java Script Skin Extensions. There's already mechanism in XWiki that solves the problem of providing JS packages using WebJars - it installs them and provides JS files for front pages: WebJars API.
More about WebJars.

However not all JS libs are already packed in webJars and available in Maven Central Repository. Thats why Extension Repository Connector - NPM was created. It enables XWiki user to download any JS library available in NPM registry and converting it internally to WebJar, made it available for import on front pages.

Configuration

No configuration needed. The extension after installment connects automatically to the NPM registry

Example

Let's assume that you want to import to XWiki some usefull UI JS library - egjs
After installation of Extension Repository Connector - NPM, go to the "Extensions" page of the Administration. Then search for egjs by choosing "All Extensions" from the drop down list filter. The result should be more less the following:

Let's assume that you want to import to XWiki some usefull UI JS library - egjs
After installation of Extension Repository Connector - NPM, go to the "Extensions" page of the Administration. Then search for egjs by choosing "All Extensions" from the drop down list filter. The result should be more less the following:
simpleSearch.PNG

Then choose from the requests package from the result list and proceed to install it as you'd do for any XWiki extension:

Then choose from the requests package from the result list and proceed to install it as you'd do for any XWiki extension:
install.PNG

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.

Dependencies

Dependencies for this extension (org.xwiki.contrib:repository-npm 1.0):

Get Connected