electron-webapps / meteor-electron

Meteor Electron, the easiest way to create a desktop Meteor application
MIT License
326 stars 48 forks source link

Bundling meteor client for offline use. #86

Open JarnoLeConte opened 8 years ago

JarnoLeConte commented 8 years ago

My first attempt to use meteor-electron to build offline apps.

This will bundle meteor client code with the app. So instead of an external entry point rootUrl it will now have a single local entry file index.html (together with a .js and .css file) that serves the whole app. The packaged app is therefore self contained.

It relies on the package meteor-build-client which I have modified to run as node module. Originally it was a CLI only. Although that package needs some improvements. Error handling is not done very well, and there is little control over the executed commands which could lead to ghost processes. But I guess this could be improved over time.

All you have to do is include "bundleClient": true in the electron settings.

rwatts3 commented 8 years ago

This looks great any word on when it will be merged ?

johnking commented 8 years ago

I like this feature very much! And looking forward to seeing it merged!

JarnoLeConte commented 8 years ago

Until it's merged you can use my atmosphere package jarnoleconte:electron instead of meson:electron.

It would be great if people can test it. I'm not sure of the bundling method work well on all platforms.

jmarks-joshua commented 7 years ago

Hi this seems like a great idea, it's totally what i need for my next project... but I'm getting an error when i try to use the atmosphere package.

originally when i ran it i got a bunch of access issues so i ran it with sudo, but still getting that one permission denied issue.

gyp ERR! clean error gyp ERR! stack Error: EACCES: permission denied, rmdir 'build' gyp ERR! stack at Error (native) gyp ERR! System Darwin 15.6.0 gyp ERR! command gyp ERR! node -v v4.5.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok

npm ERR! Darwin 15.6.0 npm ERR! argv npm ERR! node v4.5.0 npm ERR! npm v3.10.6 npm ERR! code ELIFECYCLE npm ERR! nslog@3.0.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the nslog@3.0.0 install script 'node-gyp rebuild'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the nslog package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild

it says i should attach the log, but the log isn't where it says it is so I don't think i can.

I tried again today... works totally fine no idea what was different, but seems all good so far.