ligershark / pecan-waffle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not exclude folders

mattfraley1 opened this issue · comments

First let me say thank you. I know this is still just a POC but I really like where you guys are headed with this. It is simple and straight forward, and makes creating a new project out of any existing project a snap. I have been looking for something just like this.

Anyway, I just tried to create a project from my first project template and ran into the long file name issue. I noticed that the long file names were for node modules which I don't want to copy anyway. I added node_modules and bowerPackages to the excluded-folder list, but it is still trying to copy those folders.

First let me say thank you. I know this is still just a POC but I really like where you guys are headed with this. It is simple and straight forward, and makes creating a new project out of any existing project a snap. I have been looking for something just like this.

Thanks, I'm really excited about this.

About excluding files, I had a bunch of changes in a different branch. I just merged to master excluding files/folders should be working file now. Can you install the latest in master and try again? FYI the install script has changed so check https://github.com/ligershark/pecan-waffle/blob/master/readme.md#how-to-try-it for the latest script to past into the PS window.

Some of the syntax may have changed a bit, if you run into any errors check the format of the samples under https://github.com/ligershark/pecan-waffle/tree/master/templates. I'm going to be working on the docs soon after I implement a few other features.

I see you are using robocopy now. It got further than it did before but it still tried to move excluded folders and failed with a path to long exception. I noted that the temp path by itself is 109 characters long. I would be happy to just do something like c:\pw-temp. Maybe you could have a pw-config.ps1 file to configure some defaults and set the temp path.

I haven't done much powershell, but I will look at the code and try to help where I can. Maybe I can help with some docs, ideas, suggestions, etc. Looking forward to this!

@mattfraley1 you should be able to override with env variables today. Try this, set the following env vars before you import the module

$env=PWTempDir='c:\pw-temp\tmp'
$env=PWTempRemoteDir='c:\pw-temp\rmt'

That should probably fold under one setting and as you suggested we could have it imported via a file. Let me know if you have any issues with that.

I haven't done much powershell, but I will look at the code and try to help where I can. Maybe I can help with some docs, ideas, suggestions, etc. Looking forward to this!

Sounds good. I'd love some help especially with docs. I'm working with someone to get full support for multi-project templates in VS working. So I've been busy with some core functionality.

Yes, success! Still a couple quirks but getting closer.

I still ran into file name too long issue with the node modules. I used this https://visualstudiogallery.msdn.microsoft.com/cd0b1938-4513-4e57-b9b7-c674b4a20e79 to flatten the node modules and then it worked. When I opened the new project it immediately started restoring the node and bower packages. So I see that it is copying the excluded folders from source to temp, but not temp to new. If you could exclude folders when copying from source to temp that would be great.

I will be traveling the next few days, but will try to continue testing and giving feedback in the evenings.

@mattfraley1 can you share the sample with me so I can try and reproduce the error?

Sure, the attached zip was simply created using the ASP.net 5 MVC 6 visual studio template, then adding a few node packages.

Test.Template.zip

@mattfraley1 OK thanks, I'm able to repro it. I'll take a look to see if i can fix it.

@mattfraley1 OK In the dev branch I just made some changes that should help you avoid that issue. Can you try it and let me know if you still run into the long path issue? FYI I think there still may be some lingering issues but the exclude folder should work on node_modules and such folders for now.

Nice, using the dev branch worked great. It completed without any issues.

@mattfraley1

Nice, using the dev branch worked great. It completed without any issues.

ok closing this now