Before filing an issue on it's github, can't ua-parser-js be used on the client in Meteor? I have added 0.7.9 successfully to my 1.1.0.3 app with meteor add faisalman:ua-parser-js. It seems to be exported as UAParser in package.js here, for both client and server. Still, I can't seem to acccess it? See this MeteorPad for examples of what I've tried.
UPDATE: Issue filed on GitHub. Also note that I recommend feature detection. ;)
Related
I'm getting started with JS so I've reached the point where I have to install a live server with npm. VSCode has a popular extension that many know of called Live Server(Ritwick Dey), my question is what is the difference between using the extension and installing the package with node? Are there any standout features that could aid in my development or are they pretty much the same? Thanks
Both will work in a similar way if you do not plan to use custom configurations and work alone on a single computer.
If you are working in a large team and want to have the same setup available for everyone, you should install the node module for the project and go with the 'Usage from node' section of the documentation.
Both options have great documentation on how to customize them. They differ in naming but for the most part both projects offer similar options.
For live-server, the npm package, your can use the online documentation to see the available ones.
https://www.npmjs.com/package/live-server
For the VsCode extension, you have a list of available configuration here.
https://github.com/ritwickdey/vscode-live-server/blob/HEAD/docs/settings.md
Before selecting one for you project, you should look at the available options and see if there is a feature that might be helpful for your project.
I am trying to use Strophe.js (https://github.com/strophe/strophejs) to create a browser-based XMPP client. However, the documentation doesn't explain how to get it set up and running and the examples provided in the GitHub do not run in a browser.
How do I install strophe.js for use with a browser, or what steps should I take to use it in a javascript application that is not using node.js?
You are checking for documentation in github project repo which may or may not necessarily contain the documentation. The correct link for the documentation can be found in the project homepage (link is provided in the repo) as well as the link to the latest documentation (which is also provided in the project repo). Few examples are also included as part of the project repo ( https://github.com/strophe/strophejs/tree/master/examples)
I have migrated my meteor 1.2.1 code base to meteor 1.3.0 and also moved all client code to imports/ui to utilize lazy loading feature for imports folder.
My problem is, If I am changing any client side file its restarting every time, which slows down development time in meteor 1.3.0 as I have to wait for building process.
Please provide your suggestion or best approach to overcome this issue.
As I have used Meteor 1.3.0 imports directory structure I have faced that issue but below are solution.
I am posting answer to my question as I have found reason why Meteor rebuilding my client side code, When I change any file.
Currently I am using /imports/ui/ for storing client side code. As you all know ui directory doesn't have any special purpose in Meteor build.
So, it assume this code as client or server code and rebuild and restart meteor app every time.
If you rename that folder/directory to client then it only refresh client side code not full app because client folder have special meaning in meteor.
Moreover now you can also use latest version of meteor which help to speed up startup building your app.
Hope this will help you solve problem.
Meteor 1.4.2 is been released in these days.
In the official forum they say: The big news is improved rebuild performance.
Maybe you should give a try.
I have standard node.js REST API. And I want to use some meteor's packages like Minimongo, Tracker, Blaze (any Meteor's package)
There a lot of articles how use npm modules in Meteor but I have opposite task. Should I create some wrapper to make it possible to use as a Node modules?
There is similar question: How to use Meteor packages outside of Meteor?
but nobody answer.
this is a good question, but you cannot just use require for a meteor in npm. You also cannot use Drupal modules in in plain PHP, it will not work as in the context they are written for. Yes you can use npm packages in Meteor, but only because Meteor is build on top of Node, not vice-versa.
Meteor has its own packaging system, because Meteor Packages are Isomorph, they have the ability to share their code on client and server, like the SimpleSchema Package or many others. To make it simple for developers to use it, it's an complete encapsulated system.
But to your question. There are a some of really valuable "ports" of Meteor Packages to plain npm architecture. For example you mentioned Tracker, so there is a npm package for that.
Tracker:
https://github.com/eface2face/meteor-tracker
(There is no Readme, but I guess it should be used, like Meteor Tracker, right?)
Minimongo:
https://www.npmjs.com/package/minimongo-standalone
... just to mention some...
To port a package you just need to extract the needed code, which don't depend on Meteor and other meteor packages and create a npm package of them.. So the code still behaves the same.. Just look at the Tracker code
You have to decide, why do you need meteor packages for your node/express application? And maybe there are already some better solutions in the npm world itself. If you really depend on major meteor packages, then just use Meteor ;)
I just get the same issue so i look around perhaps it's too late
However o found this https://www.npmjs.com/package/meteor-client-packages-meteor
Perhaps it could be helpful now
Or use this which the author recommends https://www.npmjs.com/package/meteor-webpack-client
Both are available..
I'm developing a framework based on "Scalable Javascript Application Architecture" with modules that should be able to run both on the server (node) as well as the client.
I'm looking for a good project set-up/bootstrap where client and server-side could be developed/build/tested separately while still making use of some shared resources such as the mentioned modules.
I like Yeoman for a clientside setup, and it seems that yeoman is extending it's reach to include scaffolds for server-side stuff although this is still somewhat experimental.
However, to this day I 've yet to find a project setup that combines server + client setup as described above.
Any pointers, github test project, etc. highly appreciated.
You might want to take a look at this experimental branch the Yeoman team are working on:
http://github.com/yeoman/yeoman/tree/express-stack