Giter Club home page Giter Club logo

side-waffle's Introduction

SideWaffle for Visual Studio

Build status Join the chat at https://gitter.im/ligershark/side-waffle

SideWaffle.com - download the extension

The ultimate web developer template pack

A collection of Item Templates for Visual Studio 2012/2013/2015 that makes any web developer's life much easier.

The result of a search for "angular" in the "Add new item" dialog The result of a search for "angular" in the "Add new item" dialog

Add new templates

  1. Fork the project
  2. Clone it to your computer
  3. Install the Visual Studio 2012 SDK, Visual Studio 2013 SDK, or Visual Studio 2015 SDK.
  4. Open the solution in Visual Studio
  5. Watch this video tutorial
  6. After adding your templates, send us a pull request

Only high quality templates with broad appeal will be accepted

SideWaffle templates can be installed in Visual Studio 2012, 2013 and 2015, regardless of the version you use for creating new templates.

Learn more about on MSDN about customizing item templates

Releasing updates

Here in the beginning, we are probably going to release updates rather frequently to get a feel for what the best user experience might be. Expect that we will be moving toward a fixed schedule - for instance every 2-3 weeks - when we have more templates submitted from the Visual Studio community.

side-waffle's People

Contributors

beefarino avatar bradygaster avatar christianfredh avatar claq2 avatar danielthecoder avatar daviddesloovere avatar finvamp1 avatar gproulx avatar gutek avatar jaychase avatar johnpapa avatar kentcooper avatar lucamorelli avatar luisrudge avatar madskristensen avatar matthewkimber avatar matthewkruczektallan avatar mlorbetske avatar nerobianchi avatar nn--- avatar rehansaeed avatar richorama avatar rmaclean avatar rmangalore avatar ryanlangton avatar sayedihashimi avatar scottaddie avatar sorskoot avatar sravikiran avatar totpero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

side-waffle's Issues

Add VsixCompress

The .zip file is getting a little big. I tried VsixCompress a while back and it seemed to make the .zip file smaller. We should try again and then add it if the resulting .zip file is smaller.

Add ability to put templates in their own category

For templates that don't use C# or VB, such as JavaScript, it would be nice if you could put them in their own category.

For example, even if I'm not using one of the SideWaffle item templates if I was creating my own PHP template, I'd like to be able to create a Web category and then create a PHP subcategory. I'd then put the template in that category.

Angular Typescript snippet for "Directive" is not correct

The generated code is like:
interface Idirectives extends ng.IDirective {
directiveId: string;
}

interface IdirectivesScope extends ng.IScope {
greeting: string;
changeGreeting: () => void;
}

class directives implements Idirectives {
static directiveId: string = "directives";
restrict: string = "A";

constructor(private $window: ng.IWindowService) {
}

link(scope: IdirectivesScope, element, attrs) {
    scope.greeting = "Hi!";
    scope.changeGreeting = () => {
        scope.greeting = "See ya!";
    };
}

}

But I get an error from TypeScript like:
Class directives declares interface Idirectives but does not implement it: Type 'directives' is missing property 'directiveId' from type 'Idirectives'.

Is seems when adding a static property in the class does not implement the interface.

Add item templates for ASP.NET T4 scaffolder files

With VS2013 you can customize the views/controllers (all files) which are generated by the New Scaffolded Item dialog. To do this you need to copy files from C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Templates to the local project. It would be nice to have these inside of an item template so that they can be easily added to an existing project.
We should split out the files based on VB/C#.

Move template temp folder back under obj\

With a previous commit we moved the templates temporary folder from obj\ to under %localappdata% because it was suspected that VS was incorrectly picking up the .csproj when it was copied under obj\. It turns out that the file is loaded even from %localappdata%. We'll need to get to a real fix for that issue.
In the mean time we should move the temp folder back under obj\ because it will make it easier for folks who do run into the build issue to get around it.

Update to expand beyond the Web node

Currently all of the templates are showing up under the Web node in the Add New Item dialog.
Better than this is to use the directory structure for the name of the node. We can base it on the first folder under ItemTemplates

For example if you have some files under ItemTemplates\Web they will show up in the Web node. Similarly if you have ItemTemplates\WPF then they will show up under the WPF node.

Note: any folder structure under the first folder is ignored.

FYI template-builder now has this support

Updates for snippets

We now have support for snippets, but we need a few minor changes. For .snippet files under the Snippets folder we should ensure the following are true:

  1. They are marked as Content
  2. They have the following property set to true IncludeInVSIX

Related to: ligershark/template-builder#21

MultiProj - Visual Studio Error

When attempting to create a new project from the MultiProj template I get an error in visual studio:

Error: this template attempted to load component assembly 'TemplateBuilder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. For more information on this problem and how to enable this template, please see documentation on Customizing Project Templates.

I've checked the documentation at:
http://msdn.microsoft.com/en-us/library/dd631936.aspx

But have found nothing.

Move template temp folder back under obj\

With a previous commit we moved the templates temporary folder from obj\ to under %localappdata% because it was suspected that VS was incorrectly picking up the .csproj when it was copied under obj\. It turns out that the file is loaded even from %localappdata%. We'll need to get to a real fix for that issue.
In the mean time we should move the temp folder back under obj\ because it will make it easier for folks who do run into the build issue to get around it.

Item templates not available in nodejs projects

Currently the side-waffle item templates are not available in Visual Studio node.js Projects. (Project file Extension .njsproj)

see http://nodejstools.codeplex.com/

Is it possible to support this project type as well?

<ProjectTypeGuids>
{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};
{349c5851-65df-11da-9384-00065b846f21};
{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}
</ProjectTypeGuids>

Enable project template via a reference

In the current workflow users have to copy their source projects and paste them into a template pack project. It would be much better if users could have a project template created via a project reference.

Update project template to not require usage of ProjectReference

As a consequence of overloading the concept of ProjectReference for a project template all the outputs of these projects are now being placed into the .vsix itself.
This is bad for a number of reasons.
Instead of ProjectReference we should change this to something else. Eventually we should create tooling for this as well.

This is impacting #87

Design

We should have a right-click menu option Add->Template Reference when the user invokes this he will see a dialog that show the projects loaded in the solution. When the user picks an item we should create the following item in the project file.

<TemplateReference Include="..path\MyProj.csproj" />

@madskristensen can you help here? Could you add the Add->Template Reference gesture and the UI to pick the project? You could reuse most of what you created for webjobs here. If you handle the UI then I can go in and implement the MSBuild code to update the project.

Tasks
  • Add gesture in VS to add Template Reference (Mads)
  • Add UI to pick the project that the Template Reference is pointing to (Mads)
  • Update project file to write out TemplateReference (Sayed)
  • Update TemplateBuilder to support templates via TemplateReference (Sayed)

Building with MSBuild 12.0 fails

If we use msbuild.exe from C:\Program Files (x86)\MSBuild\12.0\Bin then the build will fail with the error below.

Workaround for now use msbuild.exe from C:\Windows\Microsoft.NET\Framework\v4.0.30319.

Error

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: The "ValidateVsixManifest" task failed unexpectedly.\r [C:\Data\mycode\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018: System.TypeInitializationException: The type initializer for 'Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities'
threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Settings.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified.\r [C:\Data\mycode\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018:    at Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities..cctor()\r [C:\Data\mycode\side-waffle\TemplatePack\Templ
atePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018:    --- End of inner exception stack trace ---\r [C:\Data\mycode\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018:    at Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities.GetPathToVSInstallDir()\r [C:\Data\mycode\side-waffle\Tem
platePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018:    at Microsoft.VsSDK.Build.Tasks.ValidateVsixManifestUtilities.ValidateVsix(TaskLoggingHelper log, String manifestTo
Validate, String vsixSchemaPath, String& name, String& id)\r [C:\Data\mycode\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018:    at Microsoft.VsSDK.Build.Tasks.ValidateVsixManifest.Execute()\r [C:\Data\mycode\side-waffle\TemplatePack\TemplateP
ack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()\r [C:\Data\mycod
e\side-waffle\TemplatePack\TemplatePack.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\VSSDK\Microsoft.VsSDK.targets(75,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() [C:\Data\mycode\side-waffle\Templ
atePack\TemplatePack.csproj]

Support to expand .vstemplate for multi-project templates

For single project templates we now support the ability to author a partial .vstemplate file and then have the build process fill in the Project element with files and folders. Unfortunately multi-project templates cannot leverage this feature. We need a way for multi-project templates to get this same functionality.

Update CreateTemplateTask to not require template dependencies

Currently when we go through the CreateTemplateTask to generate the fully expanded .vstemplate file we use the MSBuild APIs to load the project file and to get the list of files that it contains.

This requires that all the template dependencies (i.e. .targets files) are on disk.

We should update the CreateTemplateTask so that the .targets files are not required. We should see if @mlorbetske PR on TemplateBuilder ligershark/template-builder#38. That may introduce other issues though (what if the Include value has a property in it?).

If the MSBuild.Construction namespace doesn't help us here, then we may need to fall back to a standard XML reader.

Increase the sort order of all item templates

We need to make sure that SideWaffle templates doesn't show up above the built-in templates in the Add New Item dialog. Sort order should probably be 5000 and we might want to look at creating groups as well

Make build incremental

Currently the Item Template and Project Template creation process is not incremental. It should be.

Browser Link Extension project (not Simple version) is crash when F5( or Ctrl+F5) run.

Step.

  1. Launch VisualStudio2013Pro, and Enter Ctrl+Shift+N, and select "Browser Link Extension" (not "(simple)" edition) at Templates>Visual C#>Extensibility.
  2. Enter Ctrl + F5, then start build and finished as success.
  3. Then launch VsualStudio2013Pro "Experimental Instance".
  4. Create new ASP.NET 4.5 project on the VS2013 "Experimental Instance", and Ctrl + F5 run.
  5. Then, the VS2013 "Experimental Instance" run into null reference exception because GetManifestResourceStream called with invalid resource name.

"Browser Link Extension (simple)" project template has not this problem.

Better project template support

Creating project templates is still too hard. Ideally we want to get to the point where users can continue to load the .csproj file in VS and F5 the project to test it out. There are two challenges here:

  1. File list is in both .csproj and .vstemplate file
  2. Files need to be tokenized to have values like $safeitemname$

Using the _preprocess.xml we should be able to preserve all the standard text in the files. Now the gap that remains is the handling of the files listed in .csproj/.vbproj.

The flow that we want to light up is the following:

  1. Create your project
  2. Copy project folder to ProjectTemplates\
  3. Add a .vstemplate file
  4. Add a _preprocess.xml file(s) as needed to perform replacements

From that point forward users should be able to continue partying on the .csproj file as they normally would and then when

Project template via reference cannot have custom images

With the new method we have for create project templates via a reference the only way that your project template can have a custom icon is to include that file as a part of the project. This is because we get the list of files to copy from the project file itself.

We should add an item group that has a list of extensions for files that should always be copied over to the dest. It should be pre-populated with standard image file extensions.

This is blocking #87

Project Template Support

We should add support for creating Project Templates. Below are some details on how we can implement this.

The support for Project Templates should be consistent with that of creating Item Templates.

Project templates will be defined under the /ProjectTemplates folder. Each project template will be defined in its own folder. The folder must contain the following files.

  Project Name\
      <files that the project contains>
      Definitions\
          CSharp.vstemplate   --> If you want the template to show up for C# projects
          VB.vstemplate         --> If you want the template to show up for VB projects

The tree node in the Add New Project dialog will be determined similarly to how Item Templates work. The name of the first folder under the ProjectTemplates folder will be the name of the node. Only 1 level of nesting is supported. All other sub folders will be ignored.

Update to exclude folders starting with _Sample from templates

We should update the build logic to exclude folders starting with _Sample from the build process when building on Release mode.
When building in Debug we should include all templates. This will make it easy to have samples in the repo for developers to reference while excluding them from released packages.

After integrating this be sure to build on Release mode before a release.

Related to: ligershark/template-builder#18

Better support for multi-project templates

We should have better support for multi-project templates.

The main issue that we have today is the usage of $safeprojectname$. When there are multiple projects being created the value of ```$safeprojectname$ changes based on the project being created. This makes it difficult (impossible?) to create templates which create multiple projects.

Design

To solve this we will create a custom wizards which introduces a new template parameter $saferootprojectname$.

These wizards should be created in a new project in TemplateBuilder, and this assembly should be delivered in the TemplateBuilder NuGet package. Then we can reference this in SideWaffle and others who are creating template packs can use it as well.

Notes

Here are some notes from Imar Spaanjaars who prototyped this.

We will need two different wizards RootWizard and ChildWizard. RootWizard is invoked by the main solution template

Added two IWizard implementations: RootWizard and ChildWizard. RootWizard is invoked by the main solution template (more on that later) and ChildWizard is invoked by each child project that opts in on it.

  1. RootWizard has a static Dictionary<string, string> to store global stuff.
  2. RunStarted in RootWizard stores the current $safeprojectname$ in a new item called $saferootprojectname$
  3. RunStarted in ChildWizard copies the root based parameter into its own collection.
  4. In source.extension.vsixmanifest I referenced the custom wizards Assembly so it gets added to the VSIX:
  <Assets>
    ...
    <Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="CustomWizards" Path="|CustomWizards|" AssemblyName="|CustomWizards;AssemblyName|" />
  </Assets>
  1. In CSharp.vstemplate under ProjectTemplates\Web_Sample Multi Project_Definitions I referenced the RootWizard:
  <WizardExtension>
    <Assembly>CustomWizards, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</Assembly>
    <FullClassName>CustomWizards.RootWizard</FullClassName>
  </WizardExtension>
  1. In MyTemplate.vstemplate of the Web and Model project I referenced the ChildWizards:
  <WizardExtension>
    <Assembly>CustomWizards, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</Assembly>
    <FullClassName>CustomWizards.ChildWizard</FullClassName>
  </WizardExtension>

This is an opt-in model so you can skip this for separate projects that don't need the root namespace.

  1. Now you can use the new replacement parameter in code, project, and other files. An example from Default.aspx from the original project
  using $saferootprojectname$.Model;

  namespace $saferootprojectname$.Web {

  and another one from the references in the Web.csproj:

  <ItemGroup>
    <ProjectReference Include="..\$saferootprojectname$.Model\$saferootprojectname$.Model.csproj">
      <Project>{86b92706-ef8d-4894-8a0a-5a13aabd1012}</Project>
      <Name>$saferootprojectname$.Model</Name>
    </ProjectReference>
  </ItemGroup>

It works, but I sure wish this stuff was a little easier. File | Export Solution to Template would be nice ;-)

You can download my work in progress here:

http://imar.spaanjaars.com/Downloads/Other/SideWaffle/side-waffle-master.zip
Any questions: fire away.

Imar

Make it simple to test TemplateBuilder changes

We should have a simple workflow to test out changes to TemplateBuilder changes. When we run a build we'll need to update the following items.

  1. Path to the .targets file
  2. Path to where tasks should be loaded from

Can't create new project template

I keep having this error when i create a new NancyFX project template:

There is a circular dependency in the target dependency graph involving target "ls-DiscoverProjectTemplatesFromProjectReferences".  TemplatePack

Any help?

Ability to fully control the node/path where the template shows up

Currently we have a convention which allows users to easily place templates in locations such as Visual C#\Web\SideWaffle. In some cases it would make more sense to fully control the location where the template will be created.

We should have a mechanism where it's easy to control this fully.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.