cmichaelgraham / aurelia-typescript

A starter kit for working with the Aurelia TypeScript type definitions
MIT License
144 stars 52 forks source link

Repo structure - jsmp missing and other concerns #8

Closed kristianmandrup closed 9 years ago

kristianmandrup commented 9 years ago

Why do you keep all these skeleton apps in one repo? Why not divide them into their own repo. Would like to be able to take a skeleton app for gulp standalone and work from there just by cloning a repo or running a yo generator similar to the navigation-app. Even better, choose TypeScript or not depending on generator argument/CLI choice. How about that!

I also notice that dependencies for skel-nav-esri-gulp look very dated and that the /aurelia folder and /styles folder seem to contain the entire aurelia code base from some point in the past. Why not just reference them via jsmp in the System config.js file (which is missing :P) ? Would love to help out to resolve this :)

Cheers!

cmichaelgraham commented 9 years ago

Hi @kristianmandrup :)

The main goals behind this effort are:

  1. validate aurelia.d.ts with real examples
  2. validate requirejs and amd loaders (instead of mainstream systemjs jspm)
  3. validate esri map integration

there is an initiative underway to manage sample code in a website. once this comes out, it would probably make sense to migrate this code into that pattern.

i was really targeting folks that use visual studio and have some limited javascript experience. because of this, i thought it would be easier for that type of user to just clone the entire thing and start playing with visual studio projects.

i'm really new to all of this. i'm sure there will be big re factoring as i learn more.

feel free to clone and adapt and publish other work. we can include references to the work here - you can just submit pull requests to the doc files.

let me know your thoughts :)

kristianmandrup commented 9 years ago

Hi @cmichaelgraham,

Thanks for the clarification. I'm just surprised that you are inlining webcomponents, aurelia code base etc. instead of referencing particular versions from a package or jspm config file. Inlining code libs makes it harder to manage IMO (more difficult to stay in sync with or upgrade to later versions). Looking forward to see sample apps that work with TypeScript outside of Visual Studio. Looking forward to TypeScript: https://github.com/Microsoft/TypeScript/milestones/TypeScript%201.5

Cheers :)

cmichaelgraham commented 9 years ago

totally agree on the inlining of components - its not supportable in the long run. i really appreciate your input !! :)

csrow commented 9 years ago

The problem I am running into using config.js and SystemJS set up is that the Typescript debugging does not work in IE under IIS express in VS. For some reason your set up of single bundle load under requireJS works with Typescript debugging in VS with IE but not with JSPM loaded version.

Debugging works fine in Chrome for both set up but that is debugging in browser.

cmichaelgraham commented 9 years ago

@csrow we have had issues with IE debugging here also. seems like if you get everything set just right, it works, but it is tricky. our issues were around the dojo require and the fix had to do with the async flag, but i'm really not sure of all the details. it is definitely very helpful when it works :)

kristianmandrup commented 9 years ago

FYI. Webstorm IDE (IntelliJ) will support TypeScript in their next version (10), which is already available in Early Access Program. Will be big!!!

http://blog.jetbrains.com/webstorm/2015/02/webstorm-10-eap-140-2753/

cmichaelgraham commented 9 years ago

That is VERY cool !! :)

csrow commented 9 years ago

I think VS debugger is getting confused and not recognizing the modules as a part of the project because Aurelia handles loading of modules in AMD format internally without the use of requireJS.

How are you able to use requireJS on top of Aurelia?

cmichaelgraham commented 9 years ago

Hi @csrow :)

It is due to the genius of @EisenbergEffect - he was able to make Aurelia work properly using systemjs loader as well as requirejs amd loader, as well as dojo require-based amd loader. It is the dojo scenario i'm the most interested in, because that makes the integration with esri very nice for creating mapping apps.

i believe that this magic is located in https://github.com/aurelia/loader-default

if you look at the bundling, you will see that r.js can be used to collect up and bundle all of the aurelia libraries. That's what the samples in here are using when they run. That strategy also makes it work well with the Telerik mobile platform, another key area of interest for me.