Reuse Vue2(Nuxt2) components in Electron new browser Window - vue.js

I am making an app in Electron with Nuxt 2 and I want to open another window in witch I want to use components from ./components folder. Along those components I would want to use the Vuetify instance that I have in the main window so the design will be the same.
Communication between windows will be don with ipcMain and ipcRenderer.
How should I make the html file that I load when the secondary window is created ? What should be in there ?
I do not want to load the entire app and use only a route. The app is pretty bight and it would be just a waste of resources.
Also I use electron builder for production builds and a http server for dev builds.
Thank you.

Related

Technology select for offline Vue.Js + Electron App

I'm developping a simple agenda app in Vue.JS (Quasar) that would be deployed in electron.
In order to enable the user to continue using the app without connection (Make a change to be synced later and view the last version), I am thinking to use Electron Store.
However, I'm not sure if it is a correct choice; or shall I use PouchDB or anything else?

Is there any proteus (runtime layout engine) version of react-native?

proteus is basically a runtime layout engine for Android developed by Indian e-commerce Flipkart.
Basically, I want to be able to control my home screen & Support Screen of the app from a backend server, so that I don't have to push every for every small change and also I don't want to use web views (we all know the limitations)
I don't think such a tool exists but you should look into Firebase, specifically the remote config module. It allows you to set parameters from your backend which can then be read on your mobile app, at every launch for example. This would allow you to set custom values for any variable you might need on these screens.
You could also look into AppCenter by Microsoft. It is a service which lets you deploy app updates over the air instantly, without going through the App Store and Play Store review processes. The only downside is that you can't push updates containing native code as your app needs to be re-bundled.

Running client and server modules in Noflo

I have a noflo Node.js runtime set up with a hosted Noflo-UI. Is there any way to run client-side modules in the same graph as the Node.js runtime? I need to upload an image file, send it to the server, then send it back and display it in the preview window. Thank you very much for any input!
You cannot run them in the same graph, but you can use a noflo-nodejs runtime as a component in the noflo-browser one. You need to add noflo-runtime as a dependency in your component.json (for browser) and declare the runtime. Example

How to make dojo work offline

I have a project that loads http://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js, I want to be able use this project offline
I tried to download dojo.xd.js and link to it locally but this still doesn't work offline
In firebug, on the net tab I can see that there are a lot more .js files that load
Is there a simple way of making this work offline?
The way of integration depends on your way of using it.
I assume you have webserver running locally (without inet access)?!
At the dojo website there are several ways of dojo integration available. Just download one of them (do not use CDN) and put the file on your local web server. Then it is available through the local url (can be relative to your site).
If you wan't to build an "offline" app without a webserver then take a look at Adobe AIR and interation of the dojo toolkit with Dojo Extensions for Adobe AIR.
Another option might be the integration together with PhoneGap or Cordova to build an offline App, e.g. for an IPhone etc. with HTML/Javascript. Win8/RT Applications for the M$ AppStore does support HTML/Javascript, too (have not tested this with Dojo).
Keep in mind there are also some security restrictions (e.g. loading and execution of JavaScript) if you plan to "release" your app as simple html file (click to open in browser).

Can we package our existing HTML5 JS App for Windows 8

I have read some posts on S/O and also around the web. We are producing a HTML5 JS based web app that runs on the web. We are packaging it up for Google apps, and also for phonegap.
Can we package this app for windows 8? Of course, I appreciate it won't use the windows 8 features. But, will the app run none the less, as it stands. So that we can place it in the store and build out windows 8 features as we move forward.
I appreciate this is a slightly non-concise question, but I guess the real point is what is our quickest route to take our existing HTML 5, CSS, JS App and deploy it in the store and get it working on this platform.
In general, the answer is yes. The transition is not seamless, but you will be able to use a ton, if not all, of the application artifacts in Win8. A good test is if you can run it in IE10, you can run the app as a Win8 app. Again, this is a very broad brush - things you need to worry about are things like all scripts files need to be local (no CDN), changes to web and security contexts, and the fact that Win8 is a horizontal paradigm whereas most web apps are vertical. But in general, you should be able to make the move. Usual caveat - your mileage will vary.
Yes, although not recommended, you can package your existing app for Win8. You'll need to add a few bits of code though. The minimum would be to embed your app's start/init code within WinJS's first promise callback, like so:
args.setPromise(WinJS.UI.processAll().then(function () {
// your init code
}
You'll also need to create a couple of icons for the start screen and an image for your app's launch screen.
It is possible that you'll run into a few issues, like some security related restrictions, where you'll have to modify your code to use some native WinJS functions. This all depends on you app's implementation.
You can also check Microsoft's guidelines for migrating a web app to win8, here: http://msdn.microsoft.com/en-us/library/windows/apps/hh465143