jQWidgets Forums
jQuery UI Widgets › Forums › General Discussions › Deployment
Tagged: Bower, deploy, deployment, jqwidgets, jqx-all.js, minified, Node.js, npm, NuGet, package, package manager
This topic contains 13 replies, has 3 voices, and was last updated by Dimitar 7 years, 4 months ago.
-
AuthorDeployment Posts
-
Hi, can you please point me to any deployment notes or let me know the recommended way to access the jqwidgets library in an app deployed to a public web server? Right now, in development, I am, in effect, downloading the library to the users desktop. I am using node.js and the entire library resides in the “public” folder.
I load JQuery from https://code.jquery.com. Is there a comparable method for locating the jqwidgets .js files in a deployed application?
Thanks.
Hi emberq,
You can install jQWidgets using Bower, npm or NuGet. You can also reference jQWidgets files directly from here:
- http://jqwidgets.com/public/jqwidgets/jqx-all.js
- http://jqwidgets.com/public/jqwidgets/styles/jqx.base.css
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Great, thanks. One question – if I access the libs off yours public server how is that you determine if I’m a licensed user?
Hi emberq,
Licensed versions of jQWidgets are only available from the jQWidgets Client Portal. The files accessible from the aforementioned places are the public minified jQWidgets files. You do not need to be a licensed user to access these.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/The public minified versions – they are always the tip version – in this case 4.5.0? What if I need to stay on an earlier, like 4.3.0? How would I do that?
I’m trying to use best practice as I get ready to release my app to production.
Hi emberq,
Using npm you can do so to acquire an earlier version:
npm install jqwidgets-framework@4.0.0
Older versions are available via Bower:
bower install jqwidgets#4.0.0
and NuGet, too: https://www.nuget.org/packages/jQWidgets_Framework/. Note that the earliest version you can get with these package managers is 3.6.0.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/I am using node.js so if I was to use npm to install a particular jqwidgets release, how would I address that library client side in my html – e.g. <script src=”https://code.jquery.com/jquery-3.1.1.min.js”></script>? Also, that would not be minified, right?
I’m trying to come up with a best practice for deploying my node.js, jqwidgets web app where I can pin a version and then if I want to upgrade I can test with a newer release before adopting it in production. If I just point to the public, minified jqx-all, my users are going to get every update you make automatically without my pre-testing.
Thank you.
Hello emberq,
If you are using Node.js and deploy your application to npm, we suggest you describe the version of jQWidgets your product depends on in the file package.json. For more information, please refer to this page: https://docs.npmjs.com/files/package.json#dependencies. Then, when installing your application’s npm package, jQWidgets will also be downloaded in the
node_modules
folder locally. No matter what version of jQWidgets you wish to be downloaded, scripts do not have version suffixes, i.e.: jqxcore.js, jqxgrid.js, etc.Please also note that jQWidgets files available through npm are minified.
You may also be interested in our new npm release, jqwidgets-scripts which is a lightweight version of jqwidgets-framework that contains only the jQWidgets scripts and styles.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/OK I’m getting there with your help but if I specify an npm release then yes the package will exist in node_modules but that will be server-side in my app. How do I then address jqx-all as a script in my html? Something comparable to this: http://jqwidgets.com/public/jqwidgets/jqx-all.js?
Hello emberq,
If the scripts and your html files are both hosted on the same server (domain), you can use relative paths when referencing the files. This is actually done in our demos, because both the demo .htm files and the jQWidgets scripts are hosted on the same server (domain).
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/In Node.js I have publicly accessible resources like .js and .png in my public area and then node+modules which is not publicly accessible. SO I can’t just access the jqwidgets pacjage using a relative path. I’m a bit stuck. Do I need bower or browersfy or should I be able to do this with npm alone?
Solved.
My issue was that in my Node.js Express web app I wanted to pin the version of jqwidgets-scripts in package.json, and I wanted to access jqwidgets in the browser from node_modules on the server.
1. I pinned jqwidgets-scripts on 5.4.0 and ran npm update. That gave me node_modules/jqwidgets-scripts.
2. In app.js I added this line: app.use(‘/jqwidgets/’, express.static(path.join(__dirname + ‘/node_modules/jqwidgets-scripts/jqwidgets/’)));
So with the other dependencies in app.js, it looks like:
var express = require(‘express’);
var path = require(‘path’);
app.use(‘/jqwidgets/’, express.static(path.join(__dirname + ‘/node_modules/jqwidgets-scripts/jqwidgets/’)));
3. In my index.html where I load all js scripts, I have this:
<link rel=”stylesheet” href=”/jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”/jqwidgets/jqx-all.js”></script>This works. Now I can deliberately upgrade my production app to a specific jqwidgets version by just changing the npm dependency.
Thanks for steering me in the right direction.
Our development team member says he is not able to find a file jqx-all.min.is (or may be it is jqx-all.min.js). We are using JQ Widgets 5.1. Where to get that missing file?
Hello Sathia,
The name of the file is jqx-all.js. If you download it via npm or from the Non-Commercial or Evaluation Use download package, it will be minified. The file is also available at this link: https://jqwidgets.com/public/jqwidgets/jqx-all.js.
To download v5.1.0 specifically, please run the command
npm i jqwidgets-framework@5.1.0
. When the package is installed, jqx-all.js can be found undernode_modules\jqwidgets-framework\jqwidgets
.Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.