choojs / create-choo-electron Goto Github PK
View Code? Open in Web Editor NEW:electron: - Create a fresh Choo Electron application
License: MIT License
:electron: - Create a fresh Choo Electron application
License: MIT License
One of the hardest parts of creating electron apps is the package and release workflow. In many (not all) cases, this is a lot of boilerplate with electron and related modules.
create-choo-electron
should have an opinionated release script. When you run npm run release
, you should be able to open the empty application from the packaged app.
Currently, what's in the <head>
gets overridden by what bankai pushes in it during development. This is sufficient:
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head></head>
<body></body>
</html>
Placeholder: I'm having a few issues installing a new electron app with the release candidate of v9. Once v9 of bankai reaches greater stability I suggest a review of the choo-electron app creation process. Specifically how to handle some of the chrome security https and http2 issues that I have found popping up.
[email protected]
no longer works with the start command. Oops oops ๐ข
OS: Pop!_OS 18.10 (Ubuntu 18.10)
Node: v10.14.2
$ npm start
> [email protected] start /home/aral/ind.ie/hypha/spikes/choo-electron
> cross-env NODE_ENV=development electron main.js
App threw an error during load
TypeError: app.makeSingleInstance is not a function
at Object.<anonymous> (/home/aral/ind.ie/hypha/spikes/choo-electron/main.js:21:22)
at Object.<anonymous> (/home/aral/ind.ie/hypha/spikes/choo-electron/main.js:66:3)
at Module._compile (internal/modules/cjs/loader.js:693:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at loadApplicationPackage (/home/aral/ind.ie/hypha/spikes/choo-electron/node_modules/electron/dist/resources/default_app.asar/main.js:119:12)
at Object.<anonymous> (/home/aral/ind.ie/hypha/spikes/choo-electron/node_modules/electron/dist/resources/default_app.asar/main.js:164:5)
at Object.<anonymous> (/home/aral/ind.ie/hypha/spikes/choo-electron/node_modules/electron/dist/resources/default_app.asar/main.js:204:3)
A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: app.makeSingleInstance is not a function
at Object.<anonymous> (/home/aral/ind.ie/hypha/spikes/choo-electron/main.js:21:22)
at Object.<anonymous> (/home/aral/ind.ie/hypha/spikes/choo-electron/main.js:66:3)
at Module._compile (internal/modules/cjs/loader.js:693:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at loadApplicationPackage (/home/aral/ind.ie/hypha/spikes/choo-electron/node_modules/electron/dist/resources/default_app.asar/main.js:119:12)
at Object.<anonymous> (/home/aral/ind.ie/hypha/spikes/choo-electron/node_modules/electron/dist/resources/default_app.asar/main.js:164:5)
at Object.<anonymous> (/home/aral/ind.ie/hypha/spikes/choo-electron/node_modules/electron/dist/resources/default_app.asar/main.js:204:3)
Hello!
I really like choo and think this project is a great idea and opportunity to make my first contact with electron. ๐
I ran the generator with npx, as suggested, and then ran npm run build
inside the generated folder. After opening the generated application inside dist
, it only showed up a blank window.
I read the codebase to try to figure out what was happening and the findings/fixes resulted in this PR.
Now if I run npm run dev
I can see the "Choo choo!" text, but if I open the generated app I can only see a blank page (unless I am serving the page with npm run dev
). Is that expected?
I'm running on node v6.11.2 and osx 10.12.4.
I'm new to bankai/choo so apologies if I missed something obivous.
When I try to do something like require("fs")
then it fails. I can work around it with window.require("fs")
, is this the recommended way of doing it or is there a better way?
ฮป npm start
> [email protected] start D:\gitwork\choo-electon-app-01
> NODE_ENV=development electron main.js
'NODE_ENV' is not recognized as an internal or external command,
operable program or batch file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.