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

Angular Template updates - New Test Spec and Service #173

Merged
merged 2 commits into from
Sep 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>controller.js</DefaultName>
<Name>AngularJs Controller using 'Controller as'</Name>
<Description>AngularJs Controller: minification ready, starter dependencies, using 'Controller As' syntax. By John Papa, http://johnpapa.net</Description>
<Name>AngularJs Controller</Name>
<Description>AngularJs Controller: minification ready, starter dependencies, using 'Controller As' syntax. By John Papa, http://johnpapa.net </Description>
<ProjectType>CSharp</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>controller.js</DefaultName>
<Name>AngularJs Controller using 'Controller as'</Name>
<Description>AngularJs Controller: minification ready, starter dependencies, using 'Controller As' syntax. By John Papa, http://johnpapa.net</Description>
<Name>AngularJs Controller</Name>
<Description>AngularJs Controller: minification ready, starter dependencies, using 'Controller As' syntax. By John Papa, http://johnpapa.net </Description>
<ProjectType>VisualBasic</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>controller.js</DefaultName>
<Name>AngularJs Controller using 'Controller as'</Name>
<Description>AngularJs Controller: minification ready, starter dependencies, using 'Controller As' syntax. By John Papa, http://johnpapa.net</Description>
<Name>AngularJs Controller</Name>
<Description>AngularJs Controller: minification ready, starter dependencies, using 'Controller As' syntax. By John Papa, http://johnpapa.net </Description>
<ProjectType>Web</ProjectType>
<ProjectSubType>CSharp</ProjectSubType>
<Icon>icon.png</Icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<TemplateData>
<DefaultName>controller.js</DefaultName>
<Name>AngularJs Controller using $scope</Name>
<Description>AngularJs Controller $scope: minification ready, starter dependencies, using 'Classic' $scope syntax. By John Papa, http://johnpapa.net</Description>
<Description>AngularJs Controller $scope: minification ready, starter dependencies, using 'Classic' $scope syntax. By John Papa, http://johnpapa.net </Description>
<ProjectType>CSharp</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<TemplateData>
<DefaultName>controller.js</DefaultName>
<Name>AngularJs Controller using $scope</Name>
<Description>AngularJs Controller $scope: minification ready, starter dependencies, using 'Classic' $scope syntax. By John Papa, http://johnpapa.net</Description>
<Description>AngularJs Controller $scope: minification ready, starter dependencies, using 'Classic' $scope syntax. By John Papa, http://johnpapa.net </Description>
<ProjectType>VisualBasic</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<TemplateData>
<DefaultName>controller.js</DefaultName>
<Name>AngularJs Controller using $scope</Name>
<Description>AngularJs Controller $scope: minification ready, starter dependencies, using 'Classic' $scope syntax. By John Papa, http://johnpapa.net</Description>
<Description>AngularJs Controller $scope: minification ready, starter dependencies, using 'Classic' $scope syntax. By John Papa, http://johnpapa.net </Description>
<ProjectType>Web</ProjectType>
<ProjectSubType>CSharp</ProjectSubType>
<Icon>icon.png</Icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<TemplateData>
<DefaultName>directive.js</DefaultName>
<Name>AngularJs Directive</Name>
<Description>AngularJs Directive: minification ready and starter dependencies. By John Papa, http://johnpapa.net</Description>
<Description>AngularJs Directive: minification ready and starter dependencies. By John Papa, http://johnpapa.net </Description>
<ProjectType>CSharp</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<TemplateData>
<DefaultName>directive.js</DefaultName>
<Name>AngularJs Directive</Name>
<Description>AngularJs Directive: minification ready and starter dependencies. By John Papa, http://johnpapa.net</Description>
<Description>AngularJs Directive: minification ready and starter dependencies. By John Papa, http://johnpapa.net </Description>
<ProjectType>VisualBasic</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<TemplateData>
<DefaultName>directive.js</DefaultName>
<Name>AngularJs Directive</Name>
<Description>AngularJs Directive: minification ready and starter dependencies. By John Papa, http://johnpapa.net</Description>
<Description>AngularJs Directive: minification ready and starter dependencies. By John Papa, http://johnpapa.net </Description>
<ProjectType>Web</ProjectType>
<ProjectSubType>CSharp</ProjectSubType>
<Icon>icon.png</Icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

function $safeitemname$ ($window) {
// Usage:
//
// <$safeitemname$></$safeitemname$>
// Creates:
//
var directive = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<TemplateData>
<DefaultName>factory.js</DefaultName>
<Name>AngularJs Factory</Name>
<Description>AngularJs Factory: minification ready with starter dependencies. By John Papa, http://johnpapa.net</Description>
<Description>AngularJs Factory: minification ready with starter dependencies. By John Papa, http://johnpapa.net </Description>
<ProjectType>CSharp</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<TemplateData>
<DefaultName>factory.js</DefaultName>
<Name>AngularJs Factory</Name>
<Description>AngularJs Factory: minification ready with starter dependencies. By John Papa, http://johnpapa.net</Description>
<Description>AngularJs Factory: minification ready with starter dependencies. By John Papa, http://johnpapa.net </Description>
<ProjectType>VisualBasic</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<TemplateData>
<DefaultName>factory.js</DefaultName>
<Name>AngularJs Factory</Name>
<Description>AngularJs Factory: minification ready with starter dependencies. By John Papa, http://johnpapa.net</Description>
<Description>AngularJs Factory: minification ready with starter dependencies. By John Papa, http://johnpapa.net </Description>
<ProjectType>Web</ProjectType>
<ProjectSubType>CSharp</ProjectSubType>
<Icon>icon.png</Icon>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>service.js</DefaultName>
<Name>AngularJs Service</Name>
<Description>AngularJs Service: minification ready with starter dependencies. By John Papa, http://johnpapa.net </Description>
<ProjectType>CSharp</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
</TemplateData>
<TemplateContent>
<References />
<ProjectItem ReplaceParameters="true">service.js</ProjectItem>
</TemplateContent>
</VSTemplate>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>service.js</DefaultName>
<Name>AngularJs Service</Name>
<Description>AngularJs Service: minification ready with starter dependencies. By John Papa, http://johnpapa.net </Description>
<ProjectType>VisualBasic</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
</TemplateData>
<TemplateContent>
<References />
<ProjectItem ReplaceParameters="true">service.js</ProjectItem>
</TemplateContent>
</VSTemplate>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>service.js</DefaultName>
<Name>AngularJs Service</Name>
<Description>AngularJs Service: minification ready with starter dependencies. By John Papa, http://johnpapa.net </Description>
<ProjectType>Web</ProjectType>
<ProjectSubType>CSharp</ProjectSubType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
</TemplateData>
<TemplateContent>
<References />
<ProjectItem ReplaceParameters="true">service.js</ProjectItem>
</TemplateContent>
</VSTemplate>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(function () {
'use strict';

angular
.module('app')
.service('$safeitemname$', $safeitemname$);

$safeitemname$.$inject = ['$http'];

function $safeitemname$($http) {
this.getData = getData;

function getData() { }
}
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>spec.js</DefaultName>
<Name>AngularJs Test Spec</Name>
<Description>AngularJs Test Spec. By John Papa, http://johnpapa.net </Description>
<ProjectType>CSharp</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
</TemplateData>
<TemplateContent>
<References />
<ProjectItem ReplaceParameters="true">spec.js</ProjectItem>
</TemplateContent>
</VSTemplate>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>spec.js</DefaultName>
<Name>AngularJs Test Spec</Name>
<Description>AngularJs Test Spec. By John Papa, http://johnpapa.net </Description>
<ProjectType>VisualBasic</ProjectType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
</TemplateData>
<TemplateContent>
<References />
<ProjectItem ReplaceParameters="true">spec.js</ProjectItem>
</TemplateContent>
</VSTemplate>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>spec.js</DefaultName>
<Name>AngularJs Test Spec</Name>
<Description>AngularJs Test Spec. By John Papa, http://johnpapa.net </Description>
<ProjectType>Web</ProjectType>
<ProjectSubType>CSharp</ProjectSubType>
<Icon>icon.png</Icon>
<NumberOfParentCategoriesToRollUp>1</NumberOfParentCategoriesToRollUp>
</TemplateData>
<TemplateContent>
<References />
<ProjectItem ReplaceParameters="true">spec.js</ProjectItem>
</TemplateContent>
</VSTemplate>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions TemplatePack/ItemTemplates/Web/JavaScript/AngularJs/Test/spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
describe('$safeitemname$', function () {
var $controller,
$httpBackend,
$rootScope;

beforeEach(function () {
module('app');
inject(function (_$controller_, _$httpBackend_, _$rootScope_) {
$controller = _$controller_;
$httpBackend = _$httpBackend_;
$rootScope = _$rootScope_;
});
});

it('should exist', function () {
//TODO: expectation goes here
});
});
20 changes: 15 additions & 5 deletions TemplatePack/TemplatePack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@
<Content Include="ItemTemplates\Extensibility\BrowserLink\_Definitions\CSharp.vstemplate" />
<Content Include="ItemTemplates\Extensibility\JsonSchemaSelector\icon.png" />
<Content Include="ItemTemplates\Extensibility\JsonSchemaSelector\_Definitions\CSharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Service\icon.png" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Service\service.js" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Service\_Definitions\CSharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Service\_Definitions\VB.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Service\_Definitions\Web.csharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Test\icon.png" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Test\spec.js" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Test\_Definitions\CSharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Test\_Definitions\VB.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Test\_Definitions\Web.csharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\Mocha\icon.png" />
<Content Include="ItemTemplates\Web\JavaScript\Mocha\template.js" />
<Content Include="ItemTemplates\Web\JavaScript\Mocha\_Definitions\CSharp.vstemplate">
Expand Down Expand Up @@ -544,11 +554,11 @@
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller using %24scope\_Definitions\VB.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller using %24scope\_Definitions\Web.csharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller using %24scope\icon.png" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller\controller.js" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller\_Definitions\CSharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller\_Definitions\VB.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller\_Definitions\Web.csharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller\icon.png" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller As\controller.js" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller As\_Definitions\CSharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller As\_Definitions\VB.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller As\_Definitions\Web.csharp.vstemplate" />
<Content Include="ItemTemplates\Web\JavaScript\AngularJs\Controller As\icon.png" />
<Content Include="ItemTemplates\TypeScript\AngularJs\TypeScript Directive\_Definitions\CSharp.vstemplate" />
<Content Include="ItemTemplates\TypeScript\AngularJs\TypeScript Directive\_Definitions\VB.vstemplate" />
<Content Include="ItemTemplates\TypeScript\AngularJs\TypeScript Directive\_Definitions\Web.csharp.vstemplate" />
Expand Down
Loading