Making a hybrid command line / GUI app in node-webkit - node-webkit

How would you make an app that if run normally (ie. double-click on the icon or whatever) would run as a GUI but would also have a headless mode if used with some command line switches?

Related

Fullscreen Electron application on startup

I have created an application with Vue and Node in Electron. I run the application using command yarn run electron:serve. How can I get this application to start in full screen mode? Consider that even when the application is built, I want it to start it in full screen when .exe file is executed.
You can just use .maximize() on the main process. You can add conditions if you only want to use it in prod

How can I watch in android emulator without running compile command in react native?

I have changed my code a lot of times. Is there any command like "npm run watch" for watching real time changes and compile the code and design preview in react-native for android?
I assuming you are wanting to use 'Live Reload' or Hot Reload.
Every time you update your Javascript code, the app will automatically update without the need to reload manually. Here's how to enable and also some notes on what the differences are.
Docs: http://facebook.github.io/react-native/docs/debugging
Accessing the In-App Developer Menu
You can access the developer menu by shaking your device or by
selecting "Shake Gesture" inside the Hardware menu in the iOS
Simulator. You can also use the ⌘ + D keyboard shortcut when your
app is running in the iOS Simulator, or ⌘ + M when running in an
Android emulator on Mac OS and Ctrl+M on Windows and Linux.
Alternatively for Android, you can run the command adb shell input
keyevent 82 to open the dev menu (82 being the Menu key code).
Reloading JavaScript
Instead of recompiling your app every time you make a change, you can reload your app's JavaScript code instantly. To do so, select "Reload" from the Developer Menu. You can also press ⌘R in the iOS Simulator, or tap R twice on Android emulators.
Automatic reloading
You can speed up your development times by having your app reload
automatically any time your code changes. Automatic reloading can be
enabled by selecting "Enable Live Reload" from the Developer Menu.
You may even go a step further and keep your app running as new
versions of your files are injected into the JavaScript bundle
automatically by enabling Hot Reloading from the Developer Menu. This
will allow you to persist the app's state through reloads.
There are some instances where hot reloading cannot be implemented perfectly. If you run into any issues, use a full reload to reset your app.
You will need to rebuild your app for changes to take effect in certain situations:
You have added new resources to your native app's bundle, such as an
image in Images.xcassets on iOS or the res/drawable folder on Android.
You have modified native code (Objective-C/Swift on iOS or Java/C++ on
Android).

How to view .net application in chrome or firefox browser

I wrote project using vb.net with devexpress forms , my question is there way to view my applicatin in browser like java applet or oracle forms.
I don't think it is possible to run an executable file built for windows could run in a browser independently. JAVA is platform independent that's why we are able to run JAVA apps in browser, even we cannot run android apps directly into browser, we have to have complete android emulator device to run android apps. In the same way, we cannot run executable files directly into browser, because they are generated with respect to underline hardware platform

IntelliJ IDEA Using External Tools/Macros to Execute "ionic run" Using a Keymap

I'm getting tired of opening and closing the terminal to run small things like ionic run that need to be executed fairly frequently early on in development.
I initially tried a macro, but they don't register double clicking ALT, and opening a new terminal, and eventually closing the terminal. It only registers typing cd mobile, and ionic run. So I found a post on External Tools, but I don't understand how to setup or use them even using the docs. Is there a way to simply:
Open a terminal
Type: cd mobile
Type: ionic run
Close the terminal
that I can keymap?
Or types into the terminal/executes a script file I can drop into a folder and keymap so the terminal doesn't have to open and close.

How to Allow quick development in Appcelerator Studio?

How do I re-enable the below behavior?
I USED to have the below behavior...now I don't. I have to re-compile the whole project for every change which is killing productivity for me.
I cut and pasted the below text from another question as it explains it much better than I can....
For an iphone simulator build, the .js files are run directly by the simulator without going through the compile step needed for a distribution build. While this saves some time by itself, the real advantage is that the simulator will dynamically use whatever changes you make to a .js file when you navigate to a window using an external .js reference (i.e. the url property). So changes to app.js still need to relaunch the project. But for windows opened later, you can navigate to the window to see how it looks or test code, then just hit the back button in the navigation bar, tweak the .js, and navigate back to the desired window and immediately see the new layout or test the code changes.
This makes tweaking UI layout stuff incredibly fast compared to the android emulator, not to mention code/debug cycles for some *.js logic is as quick as backing up a screen, revising the code, and showing the screen again. Then when you get the logic worked out, switch to android and retest.
If you have Appcelerator Studio (not Titanium Studio) you can enable LiveView, which attaches a filesystem service to your project and pipes file changes at runtime, bypassing the build process. (aka hotloader, etc)
A) Turn on in Studio
B) Use the command line:
ti build -p ios —-liveview
Be sure you have the latest updates from Appcelerator to ensure parity with target compilers.
$ sudo npm install -g appcelerator
$ appc use latest
$ appc setup
If you don't have Appcelerator Studio, you could try third party solutions such as TiShadow:
$ sudo npm install -g tishadow
$ ti build -p ios --shadow
$ tishadow server
$ tishadow # run --shadow
The quickest development feature you can use is LiveView. In Appcelerator Studio, before you run the project you have a little eye icon in the toolbar to enable live view. Then Every change you save to your project will automatically refresh the emulator/device on which you are running.
You can also have a look at a project called TiShadow which basically does the same and is not related to the Studio.