Changes for page Extension Repository Connector - NPM
Last modified by Thomas Mortagne on 2024/01/22 00:23
Change comment:
Upload new image "simpleSearch3.PNG", version 1.1
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. ThomasMortagne1 +xwiki:XWiki.cristof_p
- simpleSearch3.PNG
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +xwiki:XWiki.cristof_p - Size
-
... ... @@ -1,0 +1,1 @@ 1 +68.8 KB - Content
- ExtensionCode.ExtensionClass[0]
-
- Description
-
... ... @@ -12,7 +12,7 @@ 12 12 Let's assume that you want to import to XWiki some usefull JS library for more complicated math operations - [[mathjs>>http://mathjs.org/]] 13 13 After installation of Extension Repository Connector - NPM, go to the "Extensions" page of the Administration. Then search for ## mathjs## by choosing "All Extensions" from the drop down list filter. The result should be more less the following: 14 14 15 -{{image reference="simpleSearch 2.PNG" width="600px"/}}15 +{{image reference="simpleSearch3.PNG" width="600px"/}} 16 16 17 17 Then choose the ##mathjs## from the the result list and choosing option "Install on farm" proceed to install it as you'd do for any XWiki extension: 18 18 ... ... @@ -25,7 +25,7 @@ 25 25 Create this Minimal JavaScript eXtension as described in tutorial and then replace ##Code## section with following snippet: 26 26 27 27 {{code language="JS"}} 28 -require(["$services.webjars.url('mathjs', 28 +require(["$services.webjars.url('mathjs','dist/math.js')"], function(math){ 29 29 var res = math.sqrt(-4); 30 30 alert("Square root of -4 is: " + res); 31 31 });