We're trying to create an app to track some logfiles and push those data to our API for our company. It'll be working on Mac OSX and Windows
So, we're really newbie at Electron. I just wonder there is a accepted file structure or framework for Electron ? Because, I don't want to mess up my codes in the future.
Depending on the features you want (angular, react, webpack, etc.), there are starter projects out there. Just have a look on Github for electron starters. However, most projects follow a very similar structure, having at least the following directories:
config
app (or src)
component 1
component 2
assets
fonts
images
test
You may also search for electron prebuilt, electron boilerplate or electron seed.
You can use any boilerplate in the web.
see if this fit your needs:
https://github.com/szwacz/electron-boilerplate
Related
I'm about to go head first into doing a MAJOR versioning upgrade for a legacy Angular 4 app into an Angular 6 app. I figured I could push the envelope into version 6 at most without completeley bricking the app.
That said, I know I'm about to enter into some gotchas, so I'd like insight from seasoned JavaScript Developers who have already performed these game-breaking updates.
First, I do know that these assumptions are true:
https://update.angular.io/#4.4:6.1l3
I must be all in with the Angular CLI and how it operates. Everything from kickstarting your localhost, creating a new component, to building out the final web app.
Next, here are some things to know about the existing web app:
Angular 4.4.7
ES module loader is, SystemJS.
Source code sits in Bitbucket with a direct connection into a Microsoft Azure Web App provision (NodeJS). Once the final artifact is built out via gulp task, it ships automatically into the cloud.
This web app does NOT use the Angular CLI.
Finally, here is my desired upgrade path for the aforementioned app:
Angular 6.1
ES module loader will be, webpack.
Source code will still sit in Bitbucket with a direct connection into a Microsoft Azure Web App provision (NodeJS). I'd like the final artifact to be built out via gulp task (or whatever modern day task runner applies) it ships automatically into the cloud.
This web app does will leverage the Angular CLI.
Thanks in advance for your insight.
Just take a look at here: https://update.angular.io/
Those steps listed in that link usually work.
The one thing I can say is: upgrade to version 5 and, afterward, to version 6. I've tried before to upgrade by jumping intermediary versions (from 6 to 9) and it was a terrible experience that took me like almost 2 hours in a small project.
I'm troubleshooting a React Native app and one article suggested deleting the ios/build folder, but didn't explain why. Does anyone know, in as much detail as you can, what the role of this folder is, how it's created, and what the implications are of deleting it?
Thanks!
what the role of this build folder
Actually it's the code compiled into native. when you compile your code, for example react-native run-ios , this command compile and build code for ios and then run it on IOS simulator. its generated after compiling project.
how it's created
When you run the app, the compiler will build this folder.
and what the implications are of deleting it?
Then the compiler will build the whole project from start as the build folder for IOS or ANDROID is missing which is needed to run the native app.
I hope this helps in your understanding.
ios/build folder is updated when the app is built. It contains several subfolders, each having its own use:
Build/Products
Stores final build artifacts that are installed on Simulator or device.
Build/Intermediates.noindex
Stores additional files used while building the app. These are cached to speed up subsequent builds. Removing it will slow down the next build.
Index
Xcode performs indexing of project source code and stores the index in this folder. Index is used to speed up Xcode operation like search, quick navigation, refactoring. Removing this will trigger indexing next time Xcode is opened. However, Xcode index doesn't really affect React Native developer experience since you normally don't use Xcode much while developing RN apps.
Logs
Stores logs collected while performing various tasks like building, testing, debugging etc.
ModuleCache
Stores precompiled module files. Modules allow to reduce compile time of Xcode apps. Removing this will slow down the next build.
To summarize, ios/build folder contains final installation app files, auxiliary files and precompiled modules, various logs and source code index. The main implication of removing the build folder is that the next build will be slower than usual.
i'm kinda new to electron and tried a few things with it. I'm currently working on a bigger project with a lot of existing code, where we want to integrate electron to our application. I made a extension for our app which is directly loaded and used require('electron') to get the things started.
I cannot get electron to work because i'm running this from node.
I have experimented with the electron-quick-start and when i run electron-quick-start with electron . it works without problems, but i cannot run it with node main.js.
Is there a way to pack electron in an existing app or is the only way to use electron to wrap the application into electron?
Is there a way to pack electron in an existing app or is the only way to use electron to wrap the application into electron?
Well, the answer to that is probably yes but which way to start from would be more convenient or appropriate for an existing application is an entirely different matter. Personally what I'd do would be instead of requiring electron in your existing app, to create a new Electron app that would include the needed UI and that would require your existing modules, so instead of requiring the UI from your existing module, I would require your existing module from the UI app. Of course not having seen even a single line of code and not knowing anything bout your app I cannot say for sure that it would be a good approach.
I'd like to create a mobile/cordova version of my Meteor web application. The web version uses blaze -- which I'd like to stick with -- and for the mobile app version Ionic seems like an excellent choice for UX. Ionic is more-or-less coupled with Angular which creates a templating conflict at runtime:
error: conflict: two packages included in the app (angular-templates and templating) are both trying to handle *.html
error: conflict: two packages included in the app (pbastowski:angular-babel and ecmascript) are both trying to handle *.js
Other than, say, forking my project to create a separate non-blaze repo, are there any ways to configure meteor to only use angular/babel if the app is running with cordova?
After a good bit of digging and research, this is what I've come to conclude:
It seems the typical solution to this kind of problem in Meteor is to disaggregate your application into a collection of packages.
With packages there is a greater control over how and where dependencies are loaded. So in this particular case, there'd be at least two packages -- one which contains browser specific code and another which contains Cordova specific code.
Here's one simple example of an application broken into packages supporting a mobile and web-based experiences: https://github.com/Compy/meteor-mobile-desktop
And here's a pretty comprehensive tutorial on breaking an existing application into a package based architecture: http://experimentsinmeteor.com/package-based-architecture/
Im looking for a way to minify my extjs app. The app has already (and will have more) 100+ files like views etc which are loading on the launch and I heard that using a Sencha CMD to minify it would be a good idea, when the app will finally get to production.
Unfortunately, Ive ran into some problems while using the Sencha cmd.
Here's what I did:
downloaded the app to my local
installed sencha cmd v5.1.2.52
Now I try to simply do 'sencha app build', like the tutorials say. It throws me an error [ERR] Command must be run from an app or package folder.
Already tried doing it in main folder, but also tried in "app" inside it. Always the same error.
I probably missed something, because I read about the .sencha folder, it probably should be in my application's folder, but it isnt. Maybe its because of that?
I've also seen a solution to do a 'sencha app init' (thought it could generate some init folders like .sencha) but the command doesnt exists (maybe it would work on older sencha cmd?).
If someone could be that nice and provide me some steps I should take, or point me the steps I missed, itd be very helpful. I did search for it, most of infos say the 'sencha app build' should work but it didn't, Ive also ran into the 'Sencha SDK' but people says its outdated.
If you want to use this facility,first you must use Compiler-Friendly Code Guidelines include:
Framework Awareness
Code Organization
Class Declaration
...
Read more:
http://docs-origin.sencha.com/cmd/5.x/cmd_compiler.html
It sounds like you're missing the metadata that Cmd needs to run an application build.
Try generating a new "app" with Sencha Cmd via the sencha generate app command in a new folder. Then copy your existing application into this folder (replacing the app.js file, /app/ and other bits).
Then try building your application using sencha app build