Last modified by Thomas Mortagne on 2024/01/22 00:23

<
From version < 1.2 >
edited by Krzysztof Płachno
on 2017/08/17 15:45
To version < 2.1 >
edited by Krzysztof Płachno
on 2017/08/17 16:03
>
Change comment: There is no comment for this version

Summary

Details

ExtensionCode.ExtensionClass[0]
Description
... ... @@ -1,2 +1,15 @@
1 -Extension extending Extension Module with possibility to import any npm packages from npm registry and wrap them
2 - in web jar to be later used in front part of XWiki as dependencies.
1 +[[Npm registry>>https://www.npmjs.com/]] is the most popular and used repository of JS packages. Inside XWiki JS libaries may be required for example in [[Java Script Skin Extensions>>Extension.Skin Extension Plugin]]. 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>>Extension.WebJars Integration]].
2 +More about [[WebJars>>https://www.webjars.org/]].
3 +
4 +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.
5 +
6 +== Configuration ==
7 +
8 +No configuration needed. The extension after installment connects automatically to the [[NPM registry>>registry.npmjs.org]]
9 +
10 +== Example ==
11 +
12 +Let's assume that you want to import to XWiki some usefull UI JS library - [[egjs>>https://naver.github.io/egjs/]]
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 +
15 +Then choose from the requests package from the result list and proceed to install it as you'd do for any XWiki extension:
Show installed count
... ... @@ -1,0 +1,1 @@
1 +Yes

Get Connected