Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to develop Windows 8 metro-style JS apps outside Visual Studio?

I run Windows 8 on a VM.

In fact I would like to develop locally (not on a VM).

Is there a way to run JS app in a browser rather than via Visual Studio?

Here is the what happens if I run default.htm in a browser: enter image description here

Note the filenames starting with // and /. Removed "/" and I have copied SDK so all the files are available locally:

c:\Program Files (x86)\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\Microsoft.WinJS.1.0\1.0\DesignTime\CommonConfiguration\neutral\Microsoft.WinJS.1.0\

On this occasion I get following set of errors:

enter image description here

I suspect some other files are missing, see solution explorer for the sample project: enter image description here

I'm getting more and more confused with TWO base.js files. All I want to do is to develop Windows 8 JS app just as regular web-app in a browser. This will probably save me and many other developers a lot of time not have to run via Visual Studio.

Here is the article - http://msdn.microsoft.com/en-us/library/windows/apps/Hh781229(v=win.10).aspx - How to load file resources (Windows Store apps using JavaScript and HTML) - however this isn't much help to me. Any suggestions appreciated :)

Just to clarify: I would like to publish to Windows 8 store. Only for development I would like to use browser.

like image 509
Mars Robertson Avatar asked Oct 04 '12 19:10

Mars Robertson


2 Answers

It will not be possible to run windows 8 apps in a browser. They depend on a lot of stuff which is only provided by WinRT. The WinRT framework is only available to apps running either in the simulator or when as app is run on the Windows App side of Windows.

like image 164
N_A Avatar answered Nov 01 '22 14:11

N_A


http://dougseven.com/2011/10/24/language-choice-in-windows-8-is-not-about-portability/

Some of the JavaScript is likely reusable, if it isn’t tightly coupled to WinJS or WinRT. But that’s it. Most of what makes the app work is dependent on WinRT, so its not portable – WinRT only runs on Windows 8.

So difficult to accept that I cannot run Win8 JS app directly in a browser :(

like image 33
Mars Robertson Avatar answered Nov 01 '22 13:11

Mars Robertson