I have been searching the internet but I couldn't find an answer. I just want to find out if I could use the built HTML.
To make things clear. I created a vue-CLI project. I created a built HTML by running an npm run build.
Running the npm run build will create a dist folder with an index HTML, and its needed resources.
Now I would like to add this in electron. Is this possible?
If your project is client-side html only, then it is ready to go: just use one of the minimal Electron examples, and set your index.html as the start page.
If it is connecting to a back-end server (e.g. to access a database), it can still do that, but it means the application won't be able to run offline.
It is worth considering why you want an Electron app, instead of just having a web app. E.g. Are you hitting any security restrictions or other limitations of a web app, that a desktop app does not have? If not, packaging as an Electron app might just be effort spent on something that no-one wants or needs.
As you've built with vue-cli, it might be worth looking at Quasar Framework which is a wrapper for Vue that comes with Electron and Mobile targets ready to go. You don't actually have to use any of their UI components to get this.
Related
I have found so many facility to use javascript, Angular, material design ui with Electron App Framework, I would like to know, is there any possibilities to use ANT UI for my desktop application? At-least some work around.
Yes
The short answer is yes. Electron provides an entire NodeJS environment and allows you to use common Node, Javascript and React toolsets.
In fact, Electron is listed as an officially supported environment on their Github page.
That being said, it's a very diverse library so there might be occurrences where a particular component is not supported or might need tweaking to be compatible with the Electron environment.
Update
The company I work for actually had to do this for a project we're working on so I can officially confirm that it works great.
I am building a HTML/JS/CSS application that I would like to distribute packaged either as a NW.js or Electron app. I am new to both, and have read that the packaged executables can be quite large. Since the application would be free, I find that the cost of distributing it from a CDN to be too high.
I was wondering if there was any installer that allowed the "standard" parts of the executable (the Chrome components, etc.) to be downloaded as a shared library from a free CDN, as part of the app's installation / first execution?
With either one, you could host the packages on Github using the "releases" feature, which is free. This is a common approach for a lot of open source Electron applications.
Here are some examples of this being done:
yoda
Caprine
Here is the official documentation on Github releases.
There is a module for Electron designed to make this easy called electron-gh-releases.
I've been struggling with this for a few hours now. I've looked around and I believe I'm doing everything correctly, but it's just not working. Just for fun, I'm taking the sample Dart stopwatch and making it into a Chrome packaged app. It works flawlessly in both Dartium Chrome(via dart2js) when it's a simple web app, however as a packaged app it works in neither. The dart code simply doesn't work. Are there additional steps I need to perform to make Dart work in a web app?
Thank you very much for any help you can provide!
There are a few caveats when writing a packaged app in Dart. One is related to symlinks (packaged apps don't like them, and pub uses them), and the other is related to dart2js (you need to compile with the --disallow-unsafe-eval flag).
If you're using the Editor, you can create a new chrome packaged app from the wizard. This will set up a project that handles both issues above. I'd do that and make sure it runs, and then copy your web app into that project.
I've been developing a web application and a lot of customers are asking if they can host the application in their network (for security reasons). I have been looking for a way to package up a rails app into a single executable (with server and all), but haven't been able to find anything. My other requirement is that we distribute it without the source. Because of that I was looking at JRuby and Warbler. The end product should run on linux or windows. Has anyone done anything like this before, or can anyone point me in the right direction.
Thanks
My best guess would be to use JRuby and the JRubyCompiler, although I have no idea if you could compile a whole rails project (including all the required gems). I got it to compile a small ruby script though. Anyway, if you succeed, you could package those in a jar or war and deploy that as a contained application.
It doesn't sound like you necessarily need to package it as an executable, as long as the code is obfuscated. I personally haven't needed to protect any of my code, but a quick google search returned this product http://rubyencoder.com/. I'm sure there are others out there, but the basic idea is that your code is unreadable and cannot be reverse engineered. This would allow you to run a standard rails environment without giving access to your source code.
If you have the budget and really want to outsource this, the Github guys partnered with BitRock to build their cross-platform installable product (Github Firewall Install). BitRock has this case study on their website.
Ok, please bear with my noob question here.
I'm doing the simple task of making an update to my mvc application, compiling it and then moving in onto the production server.
I just wan't to know the best way to upload the compiled files. I have a single application pool, use ftp to upload the new application files and the site points to a single directory.
If I update just one view then which
files do I upload after compiling?
Is there a way to keep the site running
while I upload new code/views?
Where can I go to find out this
information?
Generally, you can update views without needing to re-cycle your web application. You would just want to replace the old version of the file with the new version, which can be done with a simple X-Copy command.
If there are code changes, then you will need to upate the web project DLL, which requires the app to recycle. This may or may not be a huge disruption, but it does mean that users may have their session interrupted, and lose some state.
Now, the question of how you could go about doing this is a little more complex. You can write a deployment process into your build scripts, which may be the easiest approach. The trick here, though, is that if you want to only include files that have changed, this can be a little trickier using vanilla NAnt or MSBuild tasks. You may also want to look at the WebDeploy tool from the IIS team. I've not used it much myself, but it is designed specifically to deploy web projects.
You may also want to hit google for some commercial deployment tools if none of the options so far seem to work for you.