aurelia / framework

The Aurelia 1 framework entry point, bringing together all the required sub-modules of Aurelia.
MIT License
11.75k stars 629 forks source link

Is it possible to use Aurelia with Node-Webkit? #16

Closed lforge closed 9 years ago

lforge commented 9 years ago

Is there any gotcha to use Aurelia with Node-webkit?

EisenbergEffect commented 9 years ago

I haven't tested it yet...but I would really love to support that use case. I love Node-Webkit. Give it a try and see what happens. We can help work out the issues if you find some.

lforge commented 9 years ago

I am kind of new to web dev in general. My background is Oracle/back office ERP type. But I have a personal project that I would like to use node-webkit to build an app. With that said, I may need a bit more support on wiring everything together. I will give it a try and see what happen.

EisenbergEffect commented 9 years ago

I will support you through questions on this issue. Node-Webkit is important for us to support. Ask questions as you need here. When we are all done, we can take that and format it and put it in the docs for others. Thanks!

lforge commented 9 years ago

Thanks!

xbenjii commented 9 years ago

I guess the main thing it'd have to support is the file:// protocol, since this is how Node-Webkit (Now NW.js) serves it's files.

kevinrenskers commented 9 years ago

I was looking for a SPA framework that was available as CommonJS modules from NPM to use with node-webkit or atom-shell. I even asked about this on stackoverflow shortly before I "found out" about Aurelia. Still need to start my project, any day now. Expect questions and feedback about using Aurelia for this purpose :)

EisenbergEffect commented 9 years ago

I'm closing this for now. Please contact me or update here if you try it out.

lforge commented 9 years ago

Rob,

I have taken your Flickr tutorial and make it work with node-webkit. I do have a few questions.

  1. What is the minimum libraries that I need to be included to make Aurelia to work? I have copied everything in the "dist" folder, plus jspm_packages to the main node-webkit app folder. But I think that I can trim the jspm_packages down a bit. Some of the Bootstrap css can be moved to style and update my index.html file. But I am not sure how many of those files in jspm_packages are truly needed by Aurelia.
  2. This is not really a node-webkit porting question, but more or less a general question for sub-menu, can I do second line of tabs when I click on the first menu tabs in Aurelia? I think that this may be a child-router type update. But I am still learning web development overall. So I may be missing something simple here. Anyway, let me know when you have a chance please. If you want me to use a different channel for questions like this (e.g. Google group), let me know. Thanks.
EisenbergEffect commented 9 years ago

Were there any tricks to getting it working with nw? Can you share the setup? Any interest in writing some documentation on getting it set up for us?

lforge commented 9 years ago

Rob,

For your flickr tutorial, there is not much of a trick. Like I said, I just move the "dist" folder and the jspm_packages folder to the the node-webkit folder, zip them up like normal node-webkit distribution and rename the .zip to .nw file. It works out of the box. In my Mac, somehow my node-webkit can't run it directly. So I have to copy my entire node-webkit.app folder into the same folder of the node-webkit app. But from my Win7 virtual environment, I can just run it without any extra work. So all of these are just node-webkit side, has nothing to do with Aurelia.

Anyway, will keep experiment this on my spare time. For doc, I am not really sure that I am qualified for it because I am very new to web dev in general. But what I have described in this issue is what I did and it seems to work. I would like to do it to a point where I can save/retrieve data from a sqlite3 database with node-webkit running Aurelia. If I can get this example to work, then I don't mind to put that out somehow. Thanks.

EisenbergEffect commented 9 years ago

Excellent!

ryanwischkaemper commented 9 years ago

@EisenbergEffect @lforge @kevinrenskers I put together a demo-project using Aurelia with NW.js - it's available on GitHub with a corresponding post describing it.

It has gulp tasks for dev/release builds and running tests. There is no gulp watch task yet, but I'll add it soon. I also need to properly bundle and distribute any need jspm packages - right now I'm copying the entire jspm_packages folder into the release build.

rameshbansal commented 8 years ago

@ryanwischkaemper @EisenbergEffect

I am using this repo (https://github.com/ryanwischkaemper/aurelia-nw.git ) --> nw.js with aurelia .. I am able to require("nw.gui") as you did in window bar.js . But I am not able to create new gui.Menu() . Some code for reference var gui = require('nw.gui'); export class App { attached() { console.log("attached called",gui); var menu = new gui.Menu(); menu.append(new gui.MenuItem({ label: 'A', })); } }

EisenbergEffect commented 8 years ago

I haven't personally used NWJS with Aurelia. I've only used Electron. I don't see why this issue would be related to Aurelia. In any case, we would need some more information, such as an error message, etc.

himanshu-teotia commented 8 years ago

i have same issue that mentioned above . i m also not able to create instance of : var gui = require('nw.gui')

when i put this line into my code i didn't get any console after this line even didnt get a value of gui :(