Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Aurelia project templates for version 1.0.0-beta.1.2.1 #364

Closed
wants to merge 4 commits into from
Closed

Added Aurelia project templates for version 1.0.0-beta.1.2.1 #364

wants to merge 4 commits into from

Conversation

codewithtyler
Copy link
Member

Fixes #273

@sayedihashimi
Copy link
Member

VSIX is available at https://ci.appveyor.com/project/sayedihashimi/side-waffle/build/1.0.390 for anyone who has time to try it.

@madskristensen can you try it?

@madskristensen
Copy link
Member

@Thanood @adriatic Could you possibly help review this Aurelia VS template?

@adriatic
Copy link

VSIX is available at https://ci.appveyor.com/project/sayedihashimi/side-waffle/build/1.0.390 for anyone who has time to try it.

@madskristensen - could not be happier to do it - will post my findings in this thread.

@Thanood
Copy link

Thanood commented Apr 11, 2016

Tried the ES2016 template.
After a manual npm install and jspm install all went well. What you get is basically Aurelia's skeleton-navigation app.

VS did not restore all the packages when loading the project. But that is a problem I also have with the skeleton-navigation project itself. So that's not a problem of this template.

@madskristensen
Copy link
Member

Are you referring to VS not restoring the JSPM packages or npm packages? VS doesn't have support for JSPM yet

@adriatic
Copy link

@madskristensen Given that @Thanood managed to get something going (and I have not), I will start very cautiously by saying that I installed this TemplatePack.vsix and after successful install and VS reboot here is what I see as available templates:

image

None of these is Aurelia templates. Am I fetching the incorrect .vsix file? Have VS version that does not support Aurelia Template (highly unlikely)

image

@sayedihashimi
Copy link
Member

@adriatic the templates are under the JavaScript node. I got tripped up with that as well. Maybe we should move it to the Web node?

Also FYI I think it's best to follow the following steps to try it out.

  • New Project and add a standard ASP.NET 5/Core project to the solution (this takes care to create global.json and src folder.
  • New Project Aurelia and add your project to the src folder

We will need to work to create global.json, src folder but we are not there yet.

@adriatic
Copy link

@sayedihashimi

Maybe we should move it to the Web node?

It should definively be in the web node :-) - Aurelia is a front end development framework first and the fact that it is written in JavaScript second

I will run the template now, and expect to give you a ton of feedback as I am working with Guy Bedord (jspm author) on making jspm a lot more aurelia friendly, which issue (assuming that you care about it) should give us a plenty of ideas to discuss

@codewithtyler
Copy link
Member Author

@Thanood @madskristensen there is a gulp task in the project called build-jspm which will run the jspm install command.

When testing the templates myself I had some issues getting the NPM and JSPM to automatically restore as well. What I found out was that the Task Runner Explorer was not recognizing the gulp tasks. Once I finally got it to see the tasks everything ran fine.

@madskristensen
Copy link
Member

@RandomlyKnighted Can't you add an npm script for postinstall in package.json with the value jspm install? That should automatically install the jspm packages after npm is done installing its packages

@codewithtyler
Copy link
Member Author

It should. I've never actually used postinstall before, but if it's better to run the command I'll be happy to update the templates to use it.

@madskristensen
Copy link
Member

@RandomlyKnighted I think that is better than using Gulp for it

@adriatic
Copy link

Gentlemen

Can you all please give the chance to present a global view of Aurelia building process so we can map it to Visual studio in a "frictionless way". I spent a great deal of time thinking about it - and it would take me no longer than 30 minutes to reassemble it from my existing articles. Then, we can discuss all details that are mentioned in last couple of hours?

Would this work for everyone?

@Thanood
Copy link

Thanood commented Apr 11, 2016

@madskristensen Sorry for not being precise. It was npm install. I guess this is not a "real" VS problem since I sometimes get the same results when running npm install from console. Some errors about paths that could not be found or there's no permission to write.

Doing that with administrator privileges usually resolves the issue (and it did in the case above).

@RandomlyKnighted I didn't have any problems regarding the gulp tasks somehow.

@adriatic
Copy link

The document below is the copy of the article being written to synchronize the design discussion between @madskristensen and @guybedford (jspm author) -- all done in the context of the recently initiated initiative to make Aurelia a prominent member of Visual Studio supported frameworks

I am posting it here to ensure the top down approach that https://github.com/aurelia-tools/aurelia-vs project needs - establishing the common vocabulary being the obvious beginning.

The intent of this document is to present the view of the process of handling the three files shown on the Image 1 below) and to discuss how to do that best using Visual Studio resources


Simplified view of building Aurelia application process

Executive Summary

This article presents the meaning of the seemingly simple process defined as successive invocations of the standard node tools npm, jspm and gulp in the console:

npm install
jspm install
gulp watch

and explains it in terms of transformations done on the two key files used in that process

1. package.json
2. config.js

using the npm, jspm and systemJS applications.



Description

Typical aurelia application structure is shown below - and I highlighted the three key files that need to be properly maintained by Visual Studio in order to offer best development experience to Aurelia developers:



Image 1

I will use a bit more complex application than the original skeleton-navigation to illustrate some of the additional issues that do not come up in that original - as it uses a complex third party SDK (Telerik's KendoUI).

STEP 1 - provide tooling for linking

running the npm install command in the console window results with the creation of all tooling (content of the node_modules folder) needed to build the app (process described in Step 2. Step 2 creates the node_modules folder as shown below



Image 2

This section of the file package.json is used as the definition of all tooling that Aurelia app will need in the process of application tooling described next


Step 2 - linking (adding run time modules)

running the jspm install command in the console window results with the creation of all runtime modules (content of the jspm_files folder) needed (node_modules folder) to build the app. This step creates the jspm_files folder as shown below



Image 3

Note that jspm uses this section of the package.json file as the definition of the Aurelia app configuration.

Step 3 - loading and running

This process is initiated by running the command gulp watch and based on gulp configuration:



Image 4

can be performed by different tools, where browserSync is used most of the time.


Conclusion

Using this "process model" we need to map it into Visual Studio "services" without losing the semantics of NodeJS based development process. In order to ensure that such loss does not take place, the next steps consist of gradual refinement of details of each of these steps.

@adriatic
Copy link

@madskristensen

Can't you add an npm script for postinstall in package.json with the value jspm install? That should automatically install the jspm packages after npm is done installing its packages

I believe that such approach would be less than ideal as I am trying to explain in my post above

Note that I have not finished it because I do not want to overwhelm folks with too much details. Assuming that there is somebody who cares to know more, I will gladly expand it

@adriatic
Copy link

@sayedihashimi with reference to your advice above

I genuinely believe that we should raise the level of abstraction discussing * Anything Aurelia* as proposed in my note above as any feedback on this SideWaffle based template would be non-productive. Just as a few examples:

I create a new product just using the vs2016 template you provided - the simplest possible case. The project instantiation tool well over 15 minutes (all spent creating app dependencies:

image

Note the attached npm/bower log - vs npm-bower log.txt which has indications for more error conditions than any developer would expect to handle. Use this one as an example and tell whether you would "trust" that the project being built has any sense :-)

System.AggregateException: One or more errors occurred. ---> Microsoft.NodejsTools.Npm.PackageJsonException: Error reading package.json at 'C:\Work\aurelia-tools

\AureliaES2016vNext1\AureliaES2016vNext1\node_modules\babel-preset-stage-1\node_modules\babel-plugin-transform-decorators\node_modules\babel-template

\node_modules\babel-traverse\package.json': Unable to read package.json. Please ensure the file is valid JSON.

The expectation of an average user (who did not took the time to look at the log which scrolls so slow that anyone but would give up) is to hit Ctrl-F5 and see what this app looks when running. Well, he / she would see this:

image

I know what is missing (go behind the Visual Studio, use cmd.exe at the proper folder and run npm install to get the application to a "properly linked state" to be able to run - and hope that VS would resume from there :-) - however, I spend more than 10 years doing everything possible with VS and 2 years learning NodeJS based development, which fascinated me to the point that I completely dumped VS, so I know how to recover from this.

My intent here is not to criticize the current state of the Aurelia template, but rather to get is to discuss it from the top and simplify the whole process - something that would be quite difficult if we do not start from the top

@sayedihashimi
Copy link
Member

sayedihashimi commented Apr 16, 2016

@adriatic thanks a lot for your comments. I've been slammed and haven't had a chance to try this until now. Here is what I found. Before I start my comments, let me thank @RandomlyKnighted for all his work here, it's greatly appreciated, he has done all the right things template wise, and from that perspective it looks good.

Here is what I experienced.

  1. File -> New Project -> Aurelia
  2. Notice that packages are getting restored
  3. Wait

I think my internet connection was a bit slower than @adriatic. It took _more than 25 minutes to complete_. I also noticed some errors in the output along the lines.

npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.

In the same solution I went through File->New Project->Aurelia to see if the restore would be faster because the packages were cached. It's looks like it's taking just as much time as the previous project.

After this I tried to simplify this a bit so I tried the skeleton-typescript-asp.net5. Here is what I did.

  1. Clone the repo at https://github.com/aurelia/skeleton-navigation/tree/master/skeleton-typescript-asp.net5
  2. Open folder at https://github.com/aurelia/skeleton-navigation/tree/master/skeleton-typescript-asp.net5 in VS2015
  3. Wait for npm packages to restore (I didn't time it, but it was several minutes as well).

The result in error list is below.

npm-errors

It took about 4 minutes to restore here. Below is a snippet of error messages in the output window.

npm WARN install Couldn't install optional dependency: Unsupported
npm WARN prefer global [email protected] should be installed with -g
> [email protected] install C:\temp\aurelia\skeleton-typescript-asp.net5\src\skeleton-navigation-typescript-vs\node_modules\bufferutil
> node-gyp rebuild
C:\temp\aurelia\skeleton-typescript-asp.net5\src\skeleton-navigation-typescript-vs\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild ) 
module.js:327
    throw err;
    ^
Error: Cannot find module 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Function.Module.runMain (module.js:429:10)
    at startup (node.js:139:18)
    at node.js:999:3
npm WARN install:bufferutil [email protected] install: `node-gyp rebuild`
npm WARN install:bufferutil Exit status 1

I agree with @adriatic that we need to take a step back and rethink this experience. I'd like to understand what the experience is for non-windows/VS users here. Anybody who is familiar with Aurelia development have 30 minutes to chat with me?

cc @madskristensen @mohitsriv @shanselman @EisenbergEffect

@codewithtyler
Copy link
Member Author

Whatever we decide needs to be done here for the template should probably be done for the skeleton-navigation template that @sayedihashimi linked to. That way any future updates to the templates will have whatever changes we decide on.

@sayedihashimi
Copy link
Member

@RandomlyKnighted we may need some updates to Visual Studio itself, I'm not sure at this point. I'm going to have to investigate and figure out what is needed.

@adriatic
Copy link

@sayedihashimi thanks for reading my long post - and I appreciate your perception of the situation at hand ("we need to take a step back and rethink this experience") even more. It is my experience that most people are terrified of revolutions, regardless of their size (size of revolutions, not the people :-))

Visual Studio is at the moment nominally supporting "node based development", but nobody with "node based development" experience would not even consider using Visual Studio in their work. Despite a very positive changes in MS corporate culture and vision (accepting the OSS "religion" for example), it would take a lot more than enriching SideWaffle with some "node friendly" concepts) - the changes would have to take place at a lower level in order to match the performance.

Let's use the jspm / systemjs based development as the example - since it provides us with a great example of dreadful performance experience in VS. As I tried to explain in this post (a copy if its summary shown below)

image

that process of building Aurelia application (which as we well know is a node based development process) consist of running three node applications: npm.exe, jspm.exe and gulp.exe, using the content of two files - package.json and config.js.

Note that spawning a shell process in the background which would invoke npm.exe, jspm.exe and gulp.exe at the proper time with needed arguments would improve the build performance by an order of magnitude.

Given my recent rediscovery of VS Code (I tried it once, long time ago, when it was not really doing anything except being the editor), I am now beginning to wonder whether it makes sense to add the correct support for node based development, when VS code already has that.

@adriatic
Copy link

adriatic commented Apr 16, 2016

@RandomlyKnighted allow me a comment on Aurelia templates issue, by pointing you to the recent discussion with @EisenbergEffect: https://github.com/aurelia-tools/aurelia-vs/issues/6

The genesis of that discussion is simple: being unhappy with the Visual Studio current set of templates I got in touch with @madskristensen and proposed a complete rework for these templates. Immediately after that, I also told @EisenbergEffect that I am planning to do that work. Rob responded with his own view of what all needs to be done to get this be done and asked me to take over that whole project.

So, being happy that the best person will handle these issues (repeated below for your convenience)

  1. Better “new project” experience. We have someone from the community working on sidewaffle, so that should help. We also have a new CLI we are working on. I’d love to be able to integrate the CLI with VS somehow so that the experience is seamless.
  2. Server-sider rendering. One of the major new features that will be showing up in the next 6 months is server-side rendering. We’d like to have first class integration of that feature with VS and .net. I know you have some work on this for Angular 2 and React. I hope we can get the same type of integration with Aurelia.
  3. Validation - I understand there is some work done to integrate server-side and client-side validation with Angular. We also have a validation library and would love to have the same type of integration.
  4. Intellisense - It would be great to have our binding commands (.bind, .trigger) available in intellisense. Further more, because Aurelia follows simple conventions, it should be possible to also provide binding expression statement completion inside the HTML attribute, since it’s well-known what JS/TS class the view is associated with. We’d love to have these same intellisense features in VS Code as well.

I left that "battlefield" and am only making myself available to @sayedihashimi in the much narrower area of building tools

@sayedihashimi
Copy link
Member

@adriatic is there any drawback (besides size) to including node_modules folder in the template itself? I think that will solve the 20 min wait period at least.

@adriatic
Copy link

@sayedihashimi the node_modules size is absolutely prohibitive - and so is the amount of time that VS spends creating that folder. You can easily verify that yourself using the machine where you tried to run this Aurelia Skeleton Navigation project and run the following experiment, which requires node to be installed first

  1. Get the attached package.json.txt and rename it to package.json (I had to add the .txt suffix to be able to attach it here). As you know this file is in many ways equivalent to Microsoft's web.config and contains the complete definition of the tooling needed to create the Aurelia application's runtime.
  2. Assuming that you placed this package.json file in the folder c:\test start your console in that folder and issue a single command:
  npm install

This is task took a bit less than 5 minutes on my 4 years old machine, running Windows 8.1 - and the same task takes over 30 minutes when invoked by VS. This is the first surprising thing I mentioned before.

The next issue (which is present for the longest time) is the inability by the team that manages npm.exe to ensure correct invocation of C++ module that is used in npm install process. To show you what I mean - take a look at the attached install-log.txt - which has millions of error messages caused by trying to invoke a version of C++ module that I do not have on my machine - instead of finding which one I do have and use that one (this whole mess is about trying to create create some "native" modules in the node_modules, failing to do that and falling back to install Javascript equivalents. This completely unnecessary part of npm install task adds to the total time spent of course

Summary:

I described just the first step of my article describing the complete building process. Let me know it this helped, if this discussion even leads to something good and if you want to continue it.

package.json.txt
install-log.txt

@EisenbergEffect
Copy link

Wow. This is very eye opening. I honestly had no idea the VS npm experience
was like this.

I have a question. We are working on a CLI for Aurelia. Would it be
possible to create a VS dialog that took input from the developer and then
pulled that through to our CLI in a separate process? That might be a
better way to handle "new project" in the future.
On Apr 17, 2016 1:05 PM, "Nikolaj Ivancic" [email protected] wrote:

@sayedihashimi https://github.com/sayedihashimi the node_modules size
is absolutely prohibitive - and so is the amount of time that VS spends
creating that folder. You can easily verify that yourself using the machine
where you tried to run this Aurelia Skeleton Navigation project and run the
following experiment, which requires node to be installed first

Get the attached package.json.txt and rename it to package.json (I had
to add the .txt suffix to be able to attach it here). As you know this file
is in many ways equivalent to Microsoft's web.config and contains the
complete definition of the tooling needed to create the Aurelia
application's runtime.
2.

Assuming that you placed this package.json file in the folder c:\test
start your console in that folder and issue a single command:

npm install

This is task took a bit less than 5 minutes on my 4 years old machine,
running Windows 8.1 - and the same task takes over 30 minutes when invoked
by VS. This is the first surprising thing I mentioned before.

The next issue (which is present for the longest time) is the inability by
the team that manages npm.exe to ensure correct invocation of C++ module
that is used in npm install process. To show you what I mean - take a
look at the attached install-log.txt - which has millions of error messages
caused by trying to invoke a version of C++ module that I do not have on my
machine - instead of finding which one I do have and use that one (this
whole mess is about trying to create create some "native" modules in the
node_modules, failing to do that and falling back to install Javascript
equivalents. This completely unnecessary part of npm install task adds to
the total time spent of course
Summary:

I described just the first step of my article describing the complete
building process. Let me know it this helped, if this discussion even leads
to something good and if you want to continue it.

package.json.txt
https://github.com/ligershark/side-waffle/files/222748/package.json.txt
install-log.txt
https://github.com/ligershark/side-waffle/files/222749/install-log.txt


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#364 (comment)

@sayedihashimi
Copy link
Member

I have a question. We are working on a CLI for Aurelia. Would it be
possible to create a VS dialog that took input from the developer and then
pulled that through to our CLI in a separate process? That might be a
better way to handle "new project" in the future.

Yes that's possible, I'd rather a wpf dialog with options instead of raw command line params but we can discuss more details. When is the cli going to be in good shape to prototype a wizard?

In the meantime I have some ideas which may unblock us. I will play with this and get back here.

Regarding underlying npm issues, I talked to Mads and they are investigating.

Let's keep this PR open for now.

@adriatic
Copy link

@sayedihashimi - I am quite concerned that I might create the perception of pushing my nose where it does not belong. Aurelia's team and Microsoft certainly do not need me to tell them how bad is the current Visual Studio support for Node based development. You are also aware that Aurelia has additional requirements because it is based on ES5 version of Javascript and needs additional processing (Babel transpiler).

I simply became impatient thinking that you might not see the depth of the hole we are trying to fill here :-)

@EisenbergEffect
Copy link

@sayedihashimi It definitely seems that some general work on Node-based workflows needs to be done. This would benefit Aurelia but also a lot of other scenarios. We could easily build a WPF dialog to front our CLI. The CLI would be ready for this type of integration in another week or so. I'm unclear how it would all work from a "new user" perspective given that the Aurelia cli must be installed and that it itself runs on Node. But, if there's a way to do this smoothly, we would definitely be interested in pursuing it.

@sayedihashimi
Copy link
Member

sayedihashimi commented Apr 17, 2016

@adriatic

  • I am quite concerned that I might create the perception of pushing my nose where it does not belong.

We need open and honest feedback from experts to ensure that our products are providing a good experience. You're feedback is greatly appreciated, please keep it coming.

You are also aware that Aurelia has additional requirements because it is based on ES5 version of Javascript and needs additional processing (Babel transpiler).

Yes. The JavaScript experience is owned by another team but we are working with them on needed features.

@EisenbergEffect

It definitely seems that some general work on Node-based workflows needs to be done.

It sounds like we are looking into it and hopefully going to make some changes.

I'm unclear how it would all work from a "new user" perspective given that the Aurelia cli must be installed and that it itself runs on Node.

We could use the version of node that VS ships. Other than node is your cli xcopy deployable? If so and if the size is not too large we can include it or download it on demand. If it's not xcopy deployable then I think we should create a separate vsix which has the templates + detection logic to look for the cli that was installed by the user. Once your cli is ready for prototyping let me know and I'll play with it.

In the mean time the biggest problem that I'm seeing is the long wait after File->New Project. I'm going to play with this to see if I can solve that. Hopefully I can find a way to work-aound it.

I am working on a new way to author templates `pecan-waffle' which may help us here. I'll create a prototype vsix specifically for this. I am thinking to try the following.

  • Call npm install during project creation but before VS gets to it
  • Put node_modules into the vsix and see how long it takes for project creation
  • If node_modules directly in the .vsix results in a long wait, then try to put it into a .zip and then extract that on project creation to the dest folder directly.

@EisenbergEffect
Copy link

@sayedihashimi Thanks for all the great work you guys are doing!

Regarding our CLI, it requires Node 4.x or above. It has a single dependency, npm. Other than that it has no 3rd party dependencies. The CLI itself automates NPM to install dependencies during application creation time and throughout the development process. It does this in order to augment the NPM installation workflow with additional steps required for client-side package management when combined with a module loader. I'm not sure if it's x-copy deployable to be honest. It has no dependencies, but perhaps the npm dependency would be a challenge?

The CLI should be ready enough in another week or two.

@Thanood
Copy link

Thanood commented Apr 18, 2016

I'm not sure what the Aurelia CLI might bring to the table which I don't recognize (yet). I think this is really a great idea. Maybe we can even extend that (once it is ready for use/testing, of course) to be able to choose some project items or leave them out.

For example if I don't want the complete test suite for some reason (karma, protractor etc.) I could choose to not install that which would speed up project creation by a significant amount.

@EisenbergEffect If I remember correctly the Aurelia team already has such plans for Aurelia anyway (albeit web based).

I think maybe as an alternative the templates together with the above mentioned wizard/CLI could optionally provide a minimal skeleton to improve project build times.

@sayedihashimi
Copy link
Member

@EisenbergEffect @Thanood yes, I think integrating with the CLI will be the best way to go long term. I think you'd want to develop a UI with WPF and let the users pick various options, and then invoke the cli tools to create the project. I'm actually working on a .NET Core CLI experience for project creation. We're planning to integrate that into One ASP.NET in much the same way.

The wizard should also have the ability to detect if the cli tools are installed. If not then it can help the user acquire them.

In the meantime the problem here is not unique to Aurelia, so we need some solution. I've developed a new way to create VS templates (pecan-waffle). I'll be plugging this into SideWaffle soon, and it will be the primary method for template development going forward in SideWaffle (may change after my work on the .NET Core cli is done).

I've been working to refine my new template approach and I'm using a few different projects as samples. I've added the template content that @RandomlyKnighted has here into my prototype vsix. The vsix I'm working on is just for my testing, if you think this will be useful I can help get it kicked off. You can download it from https://www.dropbox.com/s/6zuvgo51d966ef2/NodeServices.zip?dl=0. In the node at C#->Web->NodeServices you'll find all the templates. Try the Aurelia one.

This method of template creation is different from how standard VS templates work. In this case all the work is done behind the scenes on the file system and then the wizard adds the project files to the solution. In this case when you pick Aurelia the following happens:

  • Custom VS wizard is invoked
  • VS wizard carries the pecan-waffle nuget package and a couple other nuget packages. Those are extracted
  • PowerShell script is invoked, passing in parameters like ProjectName, DestDir, etc
  • pecan-waffle is loaded and called to create the project at the destination
  • The template .ps1 file has a custom script that does the following
  • Downloads 7zip NuGet package
  • Extracts a file n-modules.7z into node_modules and deletes the file

The first time you run the script it has to download some files to %localappdata% so it will be a bit slower than invocations after that.

The end result is that on my box the 2nd project creation took _3 minutes_, and when it was complete the node_modules folder was fully populated and VS did not attempt to restore those packages. It would be better if we could load the project, and then kick off extraction of node_modules but my guess is that if we load the project it will also kick off a npm restore. There are some ways around this, but I think it would take some time to get that right.

Known issues in the vsix

  • Aurelia template is not in the right node. That's easily fixed when it's not intermingled with the other templates I'm testing out.
  • Icon is hard coded. I need to work on a way to enable that
  • A file named _project.vstemplate is created in the project root.

Since the CLI is on the long term horizon, if you want to use this in the mean time, I would recommend the following changes.

  • Create a new separate VSIX for this. It's too big to go into SideWaffle. We can keep the source in the SideWaffle repo, and also publish a link to sidewaffle.com.
  • Update icon
  • Show a dialog with a progress bar, and a text area showing the output of the script as it's running
  • Update the vsix to carry the 7zip nuget package and have the script load it from there

I think if there was a dialog with the text of the script output going by, the 3 minute delay wouldn't be that bad. We could work on reducing content but besides that I don't see any easy ways to decrease the time to project creation here.

When I created the project from the command line it took about 2 minutes. I may be able to improve the speed but not likely to be significant.

@adriatic
Copy link

@sayedihashimi I believe that @EisenbergEffect has somewhat different (a lot better) CLI related ideas - but he should be the one to explain that.

I am responding to your message, despite my decision not to participate in Visual Studio support for Aurelia (as stated above). @EisenbergEffect will certainly be a better partner for you with respect to Aurelia.

As my group of community based Aurelia developers is very interested in providing Aurelia developers with best possible development tools and because this area is my "specialty" for more that 30 years, we will continue this same thread in the context of Visual Studio code, environment that is specifically created for NodeJS development. I believe that we can make some non-trivial contributions in a lot shorter time than we are discussing in this thread.

I would be delighted to see you even as an observer in that project, as there are many cross pollination aspects present.

@EisenbergEffect
Copy link

@sayedihashimi You've been busy. This sounds great.

@RandomlyKnighted Can you look into the new template infrastructure that @sayedihashimi has put in place?

@sayedihashimi How far off are you from creating the VS UI over core CLI for asp.net? It would be cool if we could work on that at the same time as you, so we could share experience, ideas and solutions. If you aren't quite ready yet, that's perfectly fine. We've still got a lot of work to do on our CLI. But, whenever you are ready to do that work for asp.net, we want to work in parallel on the same stuff for Aurelia. Just keep us in the loop. Integrating with VS is pretty much a mystery to me. I can pump out WPF code no problem though. I used to do that a lot 😉

@RandomlyKnighted Do you have any WPF experience. Any interest in helping us with the VS/CLI integration?

@codewithtyler
Copy link
Member Author

@EisenbergEffect Sure I can take go through the template structure. I've been following pecan-waffle since @sayedihashimi started on it so it shouldn't take me long to get caught up.

I have very little WPF experience. As long as I'm not having to do any MVVM work with WPF 😃 I think I can manage integrating the two together.

@EisenbergEffect
Copy link

@RandomlyKnighted Excellent. I can help you on the WPF side of things if needed.
Ok, I'll wait to hear back from you on pecan-waffle and wait to hear back from @sayedihashimi on his CLI-VS integration work. I and the rest of the team will provide whatever resources/assistance is needed to make Aurelia in VS a great experience. Very exciting stuff!

@sayedihashimi On a related note, do you have connection with the VS Code team? I've been trying to get in touch with them for a while. The TS team tried to connect me but the VS Code guys never responded to the emails. I think it may have been bad timing. If you happen to know anyone and can make an introduction, that would be great. If not, not biggie. Just thought I would mention it. There are a lot of things we'd like to do in that tool too.

@codewithtyler
Copy link
Member Author

@EisenbergEffect What all do we want to include in this WPF window? For example, are we just wanting a combobox with the 2 templates listed or do we want something more complicated?

@sayedihashimi
Copy link
Member

@adriatic

I would be delighted to see you even as an observer in that project, as there are many cross pollination aspects present.

Email me details about how you'd like me to participate. If it's related to asp.net or Visual Studio then I may be interested.

@EisenbergEffect

@sayedihashimi How far off are you from creating the VS UI over core CLI for asp.net? It would be cool if we could work on that at the same time as you, so we could share experience, ideas and solutions.

We are just now starting on the CLI experience for dotnet new. Once we make good progress there we will integrate that into VS. The idea we have now is that every template that's available in the CLI will be available in VS and vice-versa. I think it will be a few months at least until we have some VS story.

I'll have to work with @RandomlyKnighted to get him started with the new vsix project. Any preference on the name of the extension? AureliaWaffle/Aurelia Templates/etc. I'll have to clean up some code and then create the new project and wire up everything.

@sayedihashimi
Copy link
Member

@RandomlyKnighted

@EisenbergEffect What all do we want to include in this WPF window? For example, are we just wanting a combobox with the 2 templates listed or do we want something more complicated?

@EisenbergEffect it would be good if you can provide mockups and notes about desired behavior so that we are on the same page. For example take a look at what I produced for a feature we added recently #166 (comment).

@EisenbergEffect
Copy link

@RandomlyKnighted For the CLI-based version, we are talking about a multi-step wizard that asks a series of questions. All that info is then gathered and sent to the CLI which uses it to determine how to generate the project. So, it's quite a bit different than what we have today. There are really no templates, but rather code that generates the templates based on choices made. If you want to see it now, you can npm install -g aurelia-cli. It actually works. Run aurelia new and you will see the multi-step process. Just know that nothing other than the defaults are implemented yet. (Also...it may be slightly broke on Windows currently ;))

The wizard is actually not hard-coded but is run via a simple JS workflow engine. It takes in a json doc that describes the steps. I don't know if we'll be able to do that for the VS version or not. It depends on how we integrate the CLI. If we can pipe standard out from our CLI back to the VS dialog...then we can do some crazy stuff. The CLI actually has the UI abstracted, so it could talk directly to a GUI if needed. Currently, it just implements a ConsoleUI. Code is on Github if you want to check it out. It's still early, but there are lots of possibilities. If we can pipe standard out to the VS dialog...we can do some crazy awesome stuff.

@codewithtyler
Copy link
Member Author

@EisenbergEffect thanks, I just went through the CLI to get an idea what to expect. I think this can be easily done. I'll make the dialog big enough to house all the questions at once so the user can just go through selecting options without having to wait on options to "appear". I also went ahead and took a look at the some of the code. Is this all of the questions that I'll need to add?

(Also...it may be slightly broke on Windows currently ;))

If you mean it doesn't do anything after you go through the dialog then yeah I'd say it's slightly broken. haha. Now that I've got it installed just let me know when you've think you've got it fixed I'll be happy to update and test it out for ya.

If we can pipe standard out from our CLI back to the VS dialog...then we can do some crazy stuff.

That's pretty much what I'll be doing here with the WPF dialog.

@EisenbergEffect
Copy link

EisenbergEffect commented Apr 22, 2016

@RandomlyKnighted I don't think we'll want to try to display all the options. Those may grow over time and there are some conditional questions based on earlier answers. Probably more of that in the future. What would be neat is if the cli could just push question/options to the WPF window and then have the WPF window push the answers back to the CLI. If we could have a general mechanism then we don't need to embed anything specific in the WPF window and it can work as we continue to update and improve the CLI. I've never tried anything like that before...so I'm not sure how easy that would be to achieve.

@codewithtyler
Copy link
Member Author

@sayedihashimi could we talk about this in our meeting on Friday?

@sayedihashimi
Copy link
Member

@RandomlyKnighted sounds good.

@codewithtyler codewithtyler deleted the aurelia-templates branch August 28, 2016 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants