How to write an Electron app with Hyper? - electron

I was wondering, how can I start to write an Electron app using the Hyper.js sources?
I am new to both Electron and Hyper, and watched a few videos on building an Electron app. But I can't quite figure out how to start the Hyper app. For instance, which is the "main" file in the sources?

Alright, after more reading and getting familiar with Node.js and Electron apps, the following procedure works:
git clone https://github.com/zeit/hyper
cd hyper
npm install
A lot of packages will be installed in a subdirectory called node_modules, then:
yarn run dev
And (in a separate terminal window):
yarn rup app
This will open an Electron app similar to the original one built by Hyper.

Related

Alternative for hybrid web app without knowledge in app/server

i used to upload my ZIP (with HTML5/CSS web app) in phonegap since 4, 5 years and create cool mobile apps. But since some months it's look like Adobe dismiss the project, no more answer on forum etc.
Is there a good solution, when you don't know everything about shift/cocoa/java and server things, to simply upload your webapp (basically a website in a zip) and get IPA/APK ?
I heard about monaco or voltbuilder. Thanks
Not really. Although I can confirm https://build.phonegap.com works for me. If you have an error related to a malformed xml, you can try to delete the project on the website and re-uplading the zip file onto a new project. That's a bug I have experienced in the past.
Otherwise, you can install Cordova and Phonegap on your pc to build it using npm on the terminal (Linux/MacOs).
$ sudo npm install -g cordova
or for windows (CMD):
C:\> npm install -g cordova
then navigate with the command line using cd to go to a folder
eg. cd myfolder.
You can see the files in your current directory with ls (Linux/MacOs) or lsdir (windows)
Once you are in your project's folder and that you can see with lsdir or ls your config.xml file of your project, then you can run those commands to add the platform you want to build:
cordova platform add ios
cordova platform add android
Finally to build the app, you need to:
cordova build
Note: To build an Ipa, you will need to use a device running MacOs since it requires XCode. I highly recommand you to get familiar with Cmd or the terminal if you are building an app.
I hope I have answered your question well

Distributing Homebrew dependencies along with electron-packager

I have an electron application that has the following dependencies:
ffmpeg
libmagic
gdbm
Currently, I use Homebrew and run brew install ffmpeg etc. upon startup of the app.
However, this is terrible for distribution. Is there a way to distribute these dependencies packaged alongside my application so that the end user doesn't have to have Homebrew or deal with installation errors? I'm distributing my app using electron-packager to create a Desktop Mac app.
I gave the specific dependencies just for context -- hopefully there is a solution that would work with any generic dependency?
It is possible with dynamic linking
use https://www.npmjs.com/package/ffmpeg-static
Example Usage
Returns the path of a statically linked ffmpeg binary on the local filesystem.
var pathToFfmpeg = require('ffmpeg-static');
console.log(pathToFfmpeg);
/Users/j/playground/node_modules/ffmpeg-static/ffmpeg
check https://discuss.atom.io/t/information-about-bundled-ffmpeg/28456/6

React native, pass index.ios.js path to package manager

I'm writing a small POC for my learning benefit. MI want to prove that I can share business logic to a web app and it's react native counterpart. The repo mis below.
https://github.com/danfernand/rate-topic
Essentially under src folder I have a web and native folders. In that folder I have all my actions/reducers/utils.
I installed react-native as a dependency and am using the following run command.
export BABEL_ENV=native && npm run clean && ./node_modules/react-native/packager/packager.sh --project-path './src/native/' --reset-cache
I have tried all that I can find online but can't seem to be able to set the folder where the index.ios.js is. I get an error by the package manager.
Cannot find entry file index.ios.js in any of the roots: ['']
How can I fix this issue?
Find this in another stackoverflow question.
Apparently you just need to use --root
Credit where its due
React cannot find entry file in any of the roots

Can't require external react native Components

I'm currently trying to learn react Native. While building my first App I tryed to include a external Component from Github (https://github.com/voronianski/react-native-effects-view). Fallowing the small step by step instruction I installed the Component via npm npm install react-native-effects-view --save and included the native Code via XCode:
and required the Component via var EffectsView = require('react-native-effects-view');. After restarting the App I get the fallowing error: Error: Requiring unknown module "react-native-effects-view". If you are sure the module is there, try restarting the packager. (I did restart the package roughly 1000 times)
Maybe somebody can point out the mistake I did and explain me how to do it correct?
Thanks
Daniel
Try to run react-native run-ios. You need to run this after npm install.
you need to bundle your app again since emulator doesn't have the binary for react-native-effects-view module yet
so just run this command again
react-native run-ios

ionic build ios fails with "[TypeError: Arguments to path.join must be strings]"

I am trying to create an ionic app on Mac.
I followed the instructions on ionic's website to create a basic app and was able to run it in the browser but when I run "ionic build ios" I get following error. I cannot find a log file or any other error to debug this. How do I go about fixing this?
Check your Gulp version and gulpfile.js. You may need to remove the calls to gulp.src
See:
Gulp TypeError: Arguments to path.join must be strings
and
https://github.com/sindresorhus/gulp-ruby-sass/issues/191
ok, after lot of looking and searching I figured my npm install was messed up.
Part of my installs were in /usr/local and few of them were in /User/user.name/npm folders. /Users/user.name/npm was set in the npm config prefix.
I had two installs of cordova, one on each folder above. Some how the cordova from /usr/local was getting used to create the project and that was the old version.
To fix the problem, I uninstalled all my global npm installs and pointed my npm config prefix to /usr/local and gave myself execute permission on that folder. Everything is working now.
Here is the video that explains how to do it: https://docs.npmjs.com/getting-started/fixing-npm-permissions

Resources