├── .editorconfig ├── .gitignore ├── .jshintignore ├── .jshintrc ├── .travis.yml ├── AngularController ├── USAGE └── index.js ├── AngularControllerAs ├── USAGE └── index.js ├── AngularDirective ├── USAGE └── index.js ├── AngularFactory ├── USAGE └── index.js ├── AngularModule ├── USAGE └── index.js ├── BowerJson ├── USAGE └── index.js ├── Class ├── USAGE └── index.js ├── CoffeeScript ├── USAGE └── index.js ├── Config ├── USAGE └── index.js ├── Gruntfile ├── USAGE └── index.js ├── Gulpfile ├── USAGE └── index.js ├── HTMLPage ├── USAGE └── index.js ├── Interface ├── USAGE └── index.js ├── JSON ├── USAGE └── index.js ├── JSONSchema ├── USAGE └── index.js ├── JSX ├── USAGE └── index.js ├── JScript ├── USAGE └── index.js ├── JavaScript ├── USAGE └── index.js ├── Middleware ├── USAGE └── index.js ├── MvcController ├── USAGE └── index.js ├── MvcView ├── USAGE └── index.js ├── PackageJson ├── USAGE └── index.js ├── README.md ├── StartupClass ├── USAGE └── index.js ├── StyleSheet ├── USAGE └── index.js ├── StyleSheetLess ├── USAGE └── index.js ├── StyleSheetSCSS ├── USAGE └── index.js ├── TagHelper ├── USAGE └── index.js ├── TextFile ├── USAGE └── index.js ├── TypeScript ├── USAGE └── index.js ├── TypeScriptConfig ├── USAGE └── index.js ├── WebApiController ├── USAGE └── index.js ├── app ├── USAGE └── index.js ├── e2etest.sh ├── gitignore └── index.js ├── package.json ├── script-base-basic.js ├── script-base.js ├── templates ├── .bowerrc ├── AngularController.js ├── AngularControllerAs.js ├── AngularDirective.js ├── AngularFactory.js ├── AngularModule.js ├── Interface.cs ├── JSONSchema.json ├── JSX.jsx ├── Middleware.cs ├── MvcController.cs ├── MvcView.cshtml ├── Startup.cs ├── StyleSheet.css ├── StyleSheet.less ├── StyleSheet.scss ├── TagHelper.cs ├── TextFile.txt ├── WebApiController.cs ├── bower.json ├── class.cs ├── config.json ├── gitignore.txt ├── gulpfile.js ├── package.json ├── projects │ ├── classlib │ │ ├── class.cs │ │ └── project.json │ ├── console │ │ ├── Program.cs │ │ └── project.json │ ├── empty │ │ ├── Startup.cs │ │ ├── hosting.ini │ │ └── project.json │ ├── foundation5 │ │ ├── .bowerrc │ │ ├── .editorconfig │ │ ├── .jshintrc │ │ ├── Controllers │ │ │ ├── AccountController.cs │ │ │ ├── HomeController.cs │ │ │ └── ManageController.cs │ │ ├── Gruntfile.js │ │ ├── Migrations │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models │ │ │ ├── AccountViewModels.cs │ │ │ ├── IdentityModels.cs │ │ │ └── ManageViewModels.cs │ │ ├── README.md │ │ ├── Services │ │ │ └── MessageServices.cs │ │ ├── Views │ │ │ ├── Account │ │ │ │ ├── ConfirmEmail.cshtml │ │ │ │ ├── ExternalLoginConfirmation.cshtml │ │ │ │ ├── ExternalLoginFailure.cshtml │ │ │ │ ├── ForgotPassword.cshtml │ │ │ │ ├── ForgotPasswordConfirmation.cshtml │ │ │ │ ├── Lockout.cshtml │ │ │ │ ├── Login.cshtml │ │ │ │ ├── Register.cshtml │ │ │ │ ├── ResetPassword.cshtml │ │ │ │ ├── ResetPasswordConfirmation.cshtml │ │ │ │ ├── SendCode.cshtml │ │ │ │ └── VerifyCode.cshtml │ │ │ ├── Home │ │ │ │ ├── About.cshtml │ │ │ │ ├── Contact.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── Manage │ │ │ │ ├── AddPhoneNumber.cshtml │ │ │ │ ├── ChangePassword.cshtml │ │ │ │ ├── Index.cshtml │ │ │ │ ├── ManageLogins.cshtml │ │ │ │ ├── RemoveLogin.cshtml │ │ │ │ ├── SetPassword.cshtml │ │ │ │ └── VerifyPhoneNumber.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ ├── _Layout.cshtml │ │ │ │ ├── _LoginPartial.cshtml │ │ │ │ └── _ValidationScriptsPartial.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ └── _ViewStart.cshtml │ │ ├── _footer.cshtml │ │ ├── _gulp_package.json │ │ ├── _gulp_project.json │ │ ├── _gulpfile.js │ │ ├── _header.cshtml │ │ ├── bower.json │ │ ├── css │ │ │ └── template_override.css │ │ ├── index.html │ │ ├── jade │ │ │ ├── footer.jade │ │ │ ├── header.jade │ │ │ └── index.jade │ │ ├── js │ │ │ └── app.js │ │ ├── package.json │ │ ├── project.json │ │ ├── scss │ │ │ ├── _appstyles.scss │ │ │ ├── _settings.scss │ │ │ └── app.scss │ │ ├── startup.cs │ │ └── wwwroot │ │ │ ├── _references.js │ │ │ └── images │ │ │ ├── ASP-NET-Banners-01.png │ │ │ ├── ASP-NET-Banners-02.png │ │ │ ├── Banner-01-Azure.png │ │ │ └── Banner-02-VS.png │ ├── nancy │ │ ├── Startup.cs │ │ ├── homemodule.cs │ │ └── project.json │ ├── unittest │ │ ├── SampleTest.cs │ │ └── project.json │ ├── web │ │ ├── .bowerrc │ │ ├── Controllers │ │ │ ├── AccountController.cs │ │ │ ├── HomeController.cs │ │ │ └── ManageController.cs │ │ ├── Gruntfile.js │ │ ├── Migrations │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models │ │ │ ├── AccountViewModels.cs │ │ │ ├── IdentityModels.cs │ │ │ └── ManageViewModels.cs │ │ ├── README.md │ │ ├── Services │ │ │ └── MessageServices.cs │ │ ├── Startup.cs │ │ ├── Views │ │ │ ├── Account │ │ │ │ ├── ConfirmEmail.cshtml │ │ │ │ ├── ExternalLoginConfirmation.cshtml │ │ │ │ ├── ExternalLoginFailure.cshtml │ │ │ │ ├── ForgotPassword.cshtml │ │ │ │ ├── ForgotPasswordConfirmation.cshtml │ │ │ │ ├── Lockout.cshtml │ │ │ │ ├── Login.cshtml │ │ │ │ ├── Register.cshtml │ │ │ │ ├── ResetPassword.cshtml │ │ │ │ ├── ResetPasswordConfirmation.cshtml │ │ │ │ ├── SendCode.cshtml │ │ │ │ └── VerifyCode.cshtml │ │ │ ├── Home │ │ │ │ ├── About.cshtml │ │ │ │ ├── Contact.cshtml │ │ │ │ └── Index.cshtml │ │ │ ├── Manage │ │ │ │ ├── AddPhoneNumber.cshtml │ │ │ │ ├── ChangePassword.cshtml │ │ │ │ ├── Index.cshtml │ │ │ │ ├── ManageLogins.cshtml │ │ │ │ ├── RemoveLogin.cshtml │ │ │ │ ├── SetPassword.cshtml │ │ │ │ └── VerifyPhoneNumber.cshtml │ │ │ ├── Shared │ │ │ │ ├── Error.cshtml │ │ │ │ ├── _Layout.cshtml │ │ │ │ ├── _LoginPartial.cshtml │ │ │ │ └── _ValidationScriptsPartial.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ └── _ViewStart.cshtml │ │ ├── bower.json │ │ ├── config.json │ │ ├── gulpfile.js │ │ ├── hosting.ini │ │ ├── package.json │ │ ├── project.json │ │ └── wwwroot │ │ │ ├── Thumbs.db │ │ │ ├── css │ │ │ └── site.css │ │ │ ├── favicon.ico │ │ │ ├── images │ │ │ ├── ASP-NET-Banners-01.png │ │ │ ├── ASP-NET-Banners-02.png │ │ │ ├── Banner-01-Azure.png │ │ │ ├── Banner-02-VS.png │ │ │ └── Thumbs.db │ │ │ └── js │ │ │ └── site.js │ ├── webapi │ │ ├── Controllers │ │ │ └── ValuesController.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── Startup.cs │ │ ├── hosting.ini │ │ └── project.json │ └── webbasic │ │ ├── .bowerrc │ │ ├── Controllers │ │ └── HomeController.cs │ │ ├── Gruntfile.js │ │ ├── README.md │ │ ├── Startup.cs │ │ ├── Views │ │ ├── Home │ │ │ ├── About.cshtml │ │ │ ├── Contact.cshtml │ │ │ └── Index.cshtml │ │ ├── Shared │ │ │ ├── Error.cshtml │ │ │ └── _Layout.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml │ │ ├── bower.json │ │ ├── config.json │ │ ├── gulpfile.js │ │ ├── hosting.ini │ │ ├── package.json │ │ ├── project.json │ │ └── wwwroot │ │ ├── css │ │ └── site.css │ │ ├── favicon.ico │ │ ├── images │ │ ├── ASP-NET-Banners-01.png │ │ ├── ASP-NET-Banners-02.png │ │ ├── Banner-01-Azure.png │ │ └── Banner-02-VS.png │ │ └── js │ │ └── site.js └── tsconfig.json └── test ├── compat.js ├── subgenerators.js ├── test-core.js ├── test-creation.js └── test-utility.js /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | npm-debug.log 4 | .npmignore 5 | .tmp 6 | typings 7 | **/project.lock.json 8 | -------------------------------------------------------------------------------- /.jshintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "esnext": true, 4 | "bitwise": true, 5 | "camelcase": true, 6 | "curly": true, 7 | "immed": true, 8 | "newcap": true, 9 | "noarg": true, 10 | "undef": true, 11 | "unused": "vars", 12 | "strict": true, 13 | "mocha": true 14 | } 15 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.12" 4 | - "0.11" 5 | - "0.10" -------------------------------------------------------------------------------- /AngularController/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new AngularJS Controller file using $scope. 3 | 4 | Example: 5 | yo aspnet:AngularController filename 6 | 7 | This will create: 8 | filename.js 9 | -------------------------------------------------------------------------------- /AngularController/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'AngularController.js', 14 | this.name + '.js', { 15 | namespace: 'MyNamespace' 16 | } 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /AngularControllerAs/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new AngularJS Controller file using `Controller As` syntax. 3 | 4 | Example: 5 | yo aspnet:AngularControllerAs filename 6 | 7 | This will create: 8 | filename.js 9 | -------------------------------------------------------------------------------- /AngularControllerAs/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'AngularControllerAs.js', 14 | this.name + '.js', { 15 | namespace: 'MyNamespace' 16 | } 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /AngularDirective/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new AngularJS directive file. 3 | 4 | Example: 5 | yo aspnet:AngularDirective filename 6 | 7 | This will create: 8 | filename.js 9 | -------------------------------------------------------------------------------- /AngularDirective/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'AngularDirective.js', 14 | this.name + '.js', { 15 | namespace: 'MyNamespace' 16 | } 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /AngularFactory/USAGE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/AngularFactory/USAGE -------------------------------------------------------------------------------- /AngularFactory/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'AngularFactory.js', 14 | this.name + '.js', { 15 | namespace: 'MyNamespace' 16 | } 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /AngularModule/USAGE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/AngularModule/USAGE -------------------------------------------------------------------------------- /AngularModule/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'AngularModule.js', 14 | this.name + '.js', { 15 | namespace: 'MyNamespace' 16 | } 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /BowerJson/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new bower.json and configuration file 3 | 4 | Example: 5 | yo aspnet:BowerJson 6 | 7 | This will create: 8 | .bowerrc 9 | bower.json 10 | -------------------------------------------------------------------------------- /BowerJson/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base-basic.js'); 4 | 5 | var Generator = module.exports = function Generator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(Generator, ScriptBase); 10 | 11 | Generator.prototype.createItem = function() { 12 | this.generateStandardFile('.bowerrc', '.bowerrc'); 13 | this.generateStandardFile('bower.json', 'bower.json'); 14 | }; 15 | -------------------------------------------------------------------------------- /Class/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new C# Class file 3 | 4 | Example: 5 | yo aspnet:Class filename 6 | 7 | This will create: 8 | filename.cs -------------------------------------------------------------------------------- /Class/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'class.cs', 14 | this.name + '.cs', { 15 | namespace: 'MyNamespace', 16 | classname: this.name 17 | } 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /CoffeeScript/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new CoffeeScript file 3 | 4 | Example: 5 | yo aspnet:CoffeeScript filename 6 | 7 | This will create: 8 | filename.coffee -------------------------------------------------------------------------------- /CoffeeScript/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'CoffeeScript.coffee', 14 | this.name + '.coffee' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /Config/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new config.json file 3 | 4 | Example: 5 | yo aspnet:Config 6 | 7 | This will create: 8 | config.json -------------------------------------------------------------------------------- /Config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base-basic.js'); 4 | 5 | var Generator = module.exports = function Generator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(Generator, ScriptBase); 10 | 11 | Generator.prototype.createItem = function() { 12 | this.generateStandardFile('config.json', 'config.json'); 13 | }; 14 | -------------------------------------------------------------------------------- /Gruntfile/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new Grunt file 3 | 4 | Example: 5 | yo aspnet:Gruntfile 6 | 7 | This will create: 8 | Gruntfile.js 9 | -------------------------------------------------------------------------------- /Gruntfile/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base-basic.js'); 4 | 5 | var Generator = module.exports = function Generator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(Generator, ScriptBase); 10 | 11 | Generator.prototype.createItem = function() { 12 | this.generateStandardFile('Gruntfile.js', 'Gruntfile.js'); 13 | }; 14 | -------------------------------------------------------------------------------- /Gulpfile/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new Gulp file 3 | 4 | Example: 5 | yo aspnet:Gulpfile 6 | 7 | This will create: 8 | gulpfile.js -------------------------------------------------------------------------------- /Gulpfile/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base-basic.js'); 4 | 5 | var Generator = module.exports = function Generator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(Generator, ScriptBase); 10 | 11 | Generator.prototype.createItem = function() { 12 | this.generateStandardFile('gulpfile.js', 'gulpfile.js'); 13 | }; 14 | -------------------------------------------------------------------------------- /HTMLPage/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new HTML file 3 | 4 | Example: 5 | yo aspnet:HTMLPage filename 6 | 7 | This will create: 8 | filename.html -------------------------------------------------------------------------------- /HTMLPage/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'HTMLPage.html', 14 | this.name + '.html' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /Interface/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new C# Interface file 3 | 4 | Example: 5 | yo aspnet:Interface filename 6 | 7 | This will create: 8 | filename.cs 9 | -------------------------------------------------------------------------------- /Interface/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'Interface.cs', 14 | this.name + '.cs', { 15 | namespace: 'MyNamespace', 16 | classname: this.name 17 | } 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /JSON/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new JSON file 3 | 4 | Example: 5 | yo aspnet:JSON filename 6 | 7 | This will create: 8 | filename.json -------------------------------------------------------------------------------- /JSON/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'JSON.json', 14 | this.name + '.json' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /JSONSchema/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new JSON schema file 3 | 4 | Example: 5 | yo aspnet:JSONSchema filename 6 | 7 | This will create: 8 | filename.json 9 | -------------------------------------------------------------------------------- /JSONSchema/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'JSONSchema.json', 14 | this.name + '.json', { 15 | name: this.name 16 | } 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /JSX/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new React JSX file 3 | 4 | Example: 5 | yo aspnet:JSX filename 6 | 7 | This will create: 8 | filename.jsx 9 | -------------------------------------------------------------------------------- /JSX/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'JSX.jsx', 14 | this.name + '.jsx' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /JScript/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new JavaScript file 3 | 4 | Example: 5 | yo aspnet:JScript filename 6 | 7 | This will create: 8 | filename.js 9 | -------------------------------------------------------------------------------- /JScript/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'JavaScript.js', 14 | this.name + '.js' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /JavaScript/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new JavaScript file 3 | 4 | Example: 5 | yo aspnet:JavaScript filename 6 | 7 | This will create: 8 | filename.js 9 | -------------------------------------------------------------------------------- /JavaScript/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = require('../JScript'); 4 | -------------------------------------------------------------------------------- /Middleware/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new C# Middleware class file 3 | 4 | Example: 5 | yo aspnet:Middleware filename 6 | 7 | This will create: 8 | filename.cs 9 | -------------------------------------------------------------------------------- /Middleware/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'Middleware.cs', 14 | this.name + '.cs', { 15 | namespace: 'MyNamespace', 16 | classname: this.name 17 | } 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /MvcController/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new MvcController 3 | 4 | Example: 5 | yo aspnet:MvcController filename 6 | 7 | This will create: 8 | filename.cs -------------------------------------------------------------------------------- /MvcController/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'MvcController.cs', 14 | this.name + '.cs', { 15 | namespace: 'MyNamespace', 16 | classname: this.name 17 | } 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /MvcView/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new MvcView 3 | 4 | Example: 5 | yo aspnet:MvcView filename 6 | 7 | This will create: 8 | filename.cshtml -------------------------------------------------------------------------------- /MvcView/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'MvcView.cshtml', 14 | this.name + '.cshtml', { 15 | pagename: this.name 16 | } 17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /PackageJson/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new package.json file 3 | 4 | Example: 5 | yo aspnet:PackageJson 6 | 7 | This will create: 8 | package.json -------------------------------------------------------------------------------- /PackageJson/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base-basic.js'); 4 | 5 | var Generator = module.exports = function Generator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(Generator, ScriptBase); 10 | 11 | Generator.prototype.createItem = function() { 12 | this.generateStandardFile('package.json', 'package.json'); 13 | }; 14 | -------------------------------------------------------------------------------- /StartupClass/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new Startup Class file 3 | 4 | Example: 5 | yo aspnet:StartupClass 6 | 7 | This will create: 8 | Startup.cs -------------------------------------------------------------------------------- /StartupClass/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base-basic'); 4 | 5 | var Generator = module.exports = function Generator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(Generator, ScriptBase); 10 | 11 | Generator.prototype.createItem = function() { 12 | this.generateStandardFile('Startup.cs', 'Startup.cs'); 13 | }; 14 | -------------------------------------------------------------------------------- /StyleSheet/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new CSS file 3 | 4 | Example: 5 | yo aspnet:CSS filename 6 | 7 | This will create: 8 | filename.css 9 | -------------------------------------------------------------------------------- /StyleSheet/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'StyleSheet.css', 14 | this.name + '.css' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /StyleSheetLess/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new Less style sheet file 3 | 4 | Example: 5 | yo aspnet:stylesheetless filename 6 | 7 | This will create: 8 | filename.less 9 | -------------------------------------------------------------------------------- /StyleSheetLess/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'StyleSheet.less', 14 | this.name + '.less' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /StyleSheetSCSS/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new Sass SCSS style sheet file 3 | 4 | Example: 5 | yo aspnet:StyleSheetSCSS filename 6 | 7 | This will create: 8 | filename.scss 9 | -------------------------------------------------------------------------------- /StyleSheetSCSS/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'StyleSheet.scss', 14 | this.name + '.scss' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /TagHelper/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new C# TagHelper file 3 | 4 | Example: 5 | yo aspnet:TagHelper filename 6 | 7 | This will create: 8 | filename.cs 9 | -------------------------------------------------------------------------------- /TagHelper/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'TagHelper.cs', 14 | this.name + '.cs', { 15 | namespace: 'MyNamespace', 16 | classname: this.name 17 | } 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /TextFile/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new Text file 3 | 4 | Example: 5 | yo aspnet:TextFile filename 6 | 7 | This will create: 8 | filename.txt 9 | -------------------------------------------------------------------------------- /TextFile/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'TextFile.txt', 14 | this.name + '.txt' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /TypeScript/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new TypeScript file 3 | 4 | Example: 5 | yo aspnet:TypeScript filename 6 | 7 | This will create: 8 | filename.ts 9 | -------------------------------------------------------------------------------- /TypeScript/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'TypeScript.ts', 14 | this.name + '.ts' 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /TypeScriptConfig/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new TypeScript configuration file 3 | 4 | Example: 5 | yo aspnet:TypeScriptConfig 6 | 7 | This will create: 8 | tsconfig.json 9 | -------------------------------------------------------------------------------- /TypeScriptConfig/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base-basic.js'); 4 | 5 | var Generator = module.exports = function Generator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(Generator, ScriptBase); 10 | 11 | Generator.prototype.createItem = function() { 12 | this.generateStandardFile('tsconfig.json', 'tsconfig.json'); 13 | }; 14 | -------------------------------------------------------------------------------- /WebApiController/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Creates a new Web API Controller 3 | 4 | Example: 5 | yo aspnet:WebApiController filename 6 | 7 | This will create: 8 | filename.cs -------------------------------------------------------------------------------- /WebApiController/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base.js'); 4 | 5 | var NamedGenerator = module.exports = function NamedGenerator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(NamedGenerator, ScriptBase); 10 | 11 | NamedGenerator.prototype.createNamedItem = function() { 12 | this.generateTemplateFile( 13 | 'WebApiController.cs', 14 | this.name + '.cs', { 15 | namespace: 'MyNamespace', 16 | classname: this.name 17 | } 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /app/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | 3 | Creates a basic ASP.NET 5 application 4 | 5 | Subgenerators: 6 | 7 | yo aspnet:AngularModule [options] 8 | yo aspnet:AngularController [options] 9 | yo aspnet:AngularControllerAs [options] 10 | yo aspnet:AngularDirective [options] 11 | yo aspnet:AngularFactory [options] 12 | yo aspnet:BowerJson [options] 13 | yo aspnet:Class [options] 14 | yo aspnet:CoffeeScript [options] 15 | yo aspnet:Config [options] 16 | yo aspnet:gitingore [options] 17 | yo aspnet:Gruntfile [options] 18 | yo aspnet:Gulpfile [options] 19 | yo aspnet:HTMLPage [options] 20 | yo aspnet:Interface [options] 21 | yo aspnet:JavaScript [options] 22 | yo aspnet:JScript [options] 23 | yo aspnet:JSON [options] 24 | yo aspnet:JSONSchema [options] 25 | yo aspnet:Middleware [options] 26 | yo aspnet:MvcController [options] 27 | yo aspnet:MvcView [options] 28 | yo aspnet:PackageJson [options] 29 | yo aspnet:StartupClass [options] 30 | yo aspnet:StyleSheet [options] 31 | yo aspnet:StyleSheetLess [options] 32 | yo aspnet:StyleSheetScss [options] 33 | yo aspnet:TagHelper [options] 34 | yo aspnet:TextFile [options] 35 | yo aspnet:TypeScript [options] 36 | yo aspnet:TypeScriptConfig [options] 37 | yo aspnet:WebApiController [options] 38 | -------------------------------------------------------------------------------- /e2etest.sh: -------------------------------------------------------------------------------- 1 | 2 | # You can use this script to manually test the yeoman generators. 3 | # There are some issues in this script (indicated by TODOs below) 4 | 5 | 6 | # upgrade to the latest released kvm 7 | KRE_FEED=https://www.nuget.org/api/v2 8 | TESTDIR=~/tmp-yotest 9 | 10 | export KRE_FEED="$KRE_FEED" 11 | echo 'Deleting packages folder at ~/.kpm/packages/' 12 | rm -r -f ~/.kpm/packages/ 13 | source kvm.sh 14 | 15 | echo 'installing kvm beta3' 16 | kvm install 1.0.0-beta3 -p 17 | kvm list 18 | 19 | if [ -d $TESTDIR ] 20 | then 21 | echo "Deleting directory at [$TESTDIR]" 22 | rm -r -f $TESTDIR 23 | fi 24 | 25 | echo 'Creating directory at $TESTDIR' 26 | mkdir $TESTDIR 27 | 28 | pushd $TESTDIR 29 | 30 | # TODO: Figure out how to pass params to yo to avoid user interaction here 31 | echo '>>> Create a default Empty app' 32 | yo aspnet 33 | pushd EmptyApplication 34 | kpm restore 35 | kpm build 36 | popd 37 | 38 | echo '>>> Create a default Console app' 39 | yo aspnet 40 | pushd ConsoleApplication 41 | kpm restore 42 | kpm build 43 | 44 | # TODO: When running the script I get a sharing violation, not sure why 45 | # but you can see Hello World was printed to the console 46 | echo '>>> Running k run, press ENTER to quit' 47 | k run 48 | popd 49 | 50 | echo '>>> Create a default Web app' 51 | yo aspnet 52 | pushd WebApplication 53 | kpm restore 54 | kpm build 55 | 56 | # TODO: When running kestrel users cannot enter input so kestrel cannot be stopped 57 | # echo '>>> Running k run, press Q then ENTER to quit' 58 | # k kestrel 59 | popd 60 | 61 | # TODO: Replace with Web API Test 62 | #echo '>>> Create a default MVC app' 63 | #yo aspnet 64 | #pushd MvcApplication 65 | #kpm restore 66 | #kpm build 67 | 68 | # TODO: When running kestrel users cannot enter input so kestrel cannot be stopped 69 | # echo '>>> Running k run, press Q then ENTER to quit' 70 | # k kestrel 71 | #popd 72 | 73 | echo '>>> Create a default Web API app' 74 | yo aspnet 75 | pushd WebAPIApplication 76 | kpm restore 77 | kpm build 78 | 79 | # TODO: When running kestrel users cannot enter input so kestrel cannot be stopped 80 | # echo '>>> Running k run, press Q then ENTER to quit' 81 | # k kestrel 82 | popd 83 | 84 | #echo '>>> Create a default Nancy app' 85 | #yo aspnet 86 | #pushd NancyApplication 87 | #kpm restore 88 | #kpm build 89 | 90 | # TODO: When running kestrel users cannot enter input so kestrel cannot be stopped 91 | # echo '>>> Running k run, press Q then ENTER to quit' 92 | # k kestrel 93 | #popd 94 | 95 | echo '>>> Create a default Class library project' 96 | yo aspnet 97 | pushd ClassLibrary 98 | kpm restore 99 | kpm build 100 | popd 101 | 102 | #echo '>>> Create a default Unit test project' 103 | #yo aspnet 104 | #pushd UnitTest 105 | #kpm restore 106 | #kpm build 107 | #popd 108 | -------------------------------------------------------------------------------- /gitignore/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var ScriptBase = require('../script-base-basic.js'); 4 | 5 | var Generator = module.exports = function Generator() { 6 | ScriptBase.apply(this, arguments); 7 | }; 8 | 9 | util.inherits(Generator, ScriptBase); 10 | 11 | Generator.prototype.createItem = function() { 12 | this.generateStandardFile('gitignore.txt', '.gitignore'); 13 | }; 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "generator-aspnet-xtianus", 3 | "version": "0.0.9", 4 | "description": "Yeoman generator for ASP.NET 5 apps", 5 | "license": "Apache-2.0", 6 | "main": "app/index.js", 7 | "repository": "xtianus79/generator-aspnet", 8 | "homepage": "https://github.com/xtianus79/generator-aspnet", 9 | "bugs": "https://github.com/xtianus79/generator-aspnet/issues", 10 | "author": { 11 | "name": "Christian Matthias", 12 | "email": "xtianus@live.com", 13 | "url": "https://github.com/xtianus79" 14 | }, 15 | "contributors": [ 16 | { 17 | "name": "Christian Matthias", 18 | "email": "xtianus@live.com", 19 | "url": "https://github.com/xtianus79" 20 | }, 21 | { 22 | "name": "Sourabh Shirhatti", 23 | "email": "shirhatti@outlook.com", 24 | "url": "https://github.com/shirhatti" 25 | }, 26 | { 27 | "name": "Sayed Hashimi", 28 | "email": "sayed.hashimi@gmail.com" 29 | }, 30 | { 31 | "name": "Shayne Boyer", 32 | "email": "spboyer@live.com", 33 | "url": "https://github.com/spboyer" 34 | }, 35 | { 36 | "name": "Jonathan Channon", 37 | "email": "jonathan@jonathanchannon.com" 38 | }, 39 | { 40 | "name": "Peter Blazejewicz", 41 | "email": "peter.blazejewicz@gmail.com", 42 | "url": "https://github.com/peterblazejewicz" 43 | }, 44 | { 45 | "name": "Suhas Joshi", 46 | "email": "suhasbjoshi@hotmail.com" 47 | } 48 | ], 49 | "engines": { 50 | "node": ">=0.10.0" 51 | }, 52 | "keywords": [ 53 | "yeoman-generator", 54 | "ASP.NET", 55 | "aspnet", 56 | "ASP", 57 | "net", 58 | "vNext", 59 | "dnx", 60 | "foundation" 61 | ], 62 | "dependencies": { 63 | "chai": "~2.3.0", 64 | "chalk": "~1.0.0", 65 | "uuid": "^2.0.1", 66 | "yeoman-generator": "~0.17.7", 67 | "yosay": "~1.0.4", 68 | "mkdirp": "^0.5.1", 69 | "vs_projectname": "^1.0.0", 70 | "yosay": "^1.0.0" 71 | }, 72 | "devDependencies": { 73 | "mocha": "^2.2.3" 74 | }, 75 | "scripts": { 76 | "test": "mocha" 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /script-base-basic.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var path = require('path'); 4 | var yeoman = require('yeoman-generator'); 5 | 6 | var Generator = module.exports = function Generator() { 7 | yeoman.generators.Base.apply(this, arguments); 8 | this.sourceRoot(path.join(__dirname, './templates/')); 9 | }; 10 | 11 | util.inherits(Generator, yeoman.generators.Base); 12 | 13 | Generator.prototype.generateStandardFile = function(sourceFile, targetFile) { 14 | this.log('You called the aspnet subgenerator with the arg ' + sourceFile); 15 | this.fs.copy(this.templatePath(sourceFile), this.destinationPath(targetFile)); 16 | this.log(targetFile + ' created.'); 17 | }; 18 | -------------------------------------------------------------------------------- /script-base.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('util'); 3 | var path = require('path'); 4 | var yeoman = require('yeoman-generator'); 5 | 6 | var NamedGenerator = module.exports = function NamedGenerator() { 7 | yeoman.generators.NamedBase.apply(this, arguments); 8 | this.sourceRoot(path.join(__dirname, './templates/')); 9 | }; 10 | 11 | util.inherits(NamedGenerator, yeoman.generators.NamedBase); 12 | 13 | NamedGenerator.prototype.generateTemplateFile = function(templateFile, targetFile, templateData) { 14 | this.log('You called the aspnet subgenerator with the arg ' + this.name); 15 | if (templateData !== null) { 16 | this.fs.copyTpl(this.templatePath(templateFile), this.destinationPath(targetFile), templateData); 17 | } else { 18 | this.fs.copyTpl(this.templatePath(templateFile), this.destinationPath(targetFile)); 19 | } 20 | this.log(targetFile + ' created.'); 21 | }; 22 | -------------------------------------------------------------------------------- /templates/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "wwwroot/lib" 3 | } 4 | -------------------------------------------------------------------------------- /templates/AngularController.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 'use strict'; 3 | 4 | angular 5 | .module('app') 6 | .controller('controller1', controller1); 7 | 8 | controller1.$inject = ['$scope']; 9 | 10 | function controller1($scope) { 11 | $scope.title = 'controller1'; 12 | 13 | activate(); 14 | 15 | function activate() {} 16 | } 17 | })(); 18 | -------------------------------------------------------------------------------- /templates/AngularControllerAs.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | 'use strict'; 4 | 5 | angular 6 | .module('app') 7 | .controller('controller', controller); 8 | 9 | controller.$inject = ['$location']; 10 | 11 | function controller($location) { 12 | /* jshint validthis:true */ 13 | var vm = this; 14 | vm.title = 'controller'; 15 | 16 | activate(); 17 | 18 | function activate() {} 19 | } 20 | })(); 21 | -------------------------------------------------------------------------------- /templates/AngularDirective.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 'use strict'; 3 | 4 | angular 5 | .module('app') 6 | .directive('directive', directive); 7 | 8 | directive.$inject = ['$window']; 9 | 10 | function directive($window) { 11 | // Usage: 12 | // 13 | // Creates: 14 | // 15 | var directive = { 16 | link: link, 17 | restrict: 'EA' 18 | }; 19 | return directive; 20 | 21 | function link(scope, element, attrs) {} 22 | } 23 | 24 | })(); 25 | -------------------------------------------------------------------------------- /templates/AngularFactory.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 'use strict'; 3 | 4 | angular 5 | .module('app') 6 | .factory('factory', factory); 7 | 8 | factory.$inject = ['$http']; 9 | 10 | function factory($http) { 11 | var service = { 12 | getData: getData 13 | }; 14 | 15 | return service; 16 | 17 | function getData() {} 18 | } 19 | })(); 20 | -------------------------------------------------------------------------------- /templates/AngularModule.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 'use strict'; 3 | 4 | angular.module('app', [ 5 | // Angular modules 6 | 'ngRoute' 7 | 8 | // Custom modules 9 | 10 | // 3rd Party Modules 11 | 12 | ]); 13 | })(); 14 | -------------------------------------------------------------------------------- /templates/Interface.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace <%= namespace %> 7 | { 8 | interface <%= classname %> 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /templates/JSONSchema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema", 3 | "title": "JSON Schema for my <%= name %> JSON format", 4 | 5 | "type": "object", 6 | 7 | "properties": { 8 | "name": { 9 | "type": "string", 10 | "description": "This shows up in tooltips for the 'name' property." 11 | }, 12 | "versions": { 13 | "type": "array", 14 | "description": "An array of version numbers.", 15 | "minItems": 1, 16 | "items": { 17 | "type": "number" 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /templates/JSX.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/JSX.jsx -------------------------------------------------------------------------------- /templates/Middleware.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Builder; 6 | using Microsoft.AspNet.Http; 7 | 8 | namespace <%= namespace %> 9 | { 10 | // You may need to install the Microsoft.AspNet.Http.Abstractions package into your project 11 | public class <%= classname %> 12 | { 13 | private readonly RequestDelegate _next; 14 | 15 | public <%= classname %>(RequestDelegate next) 16 | { 17 | _next = next; 18 | } 19 | 20 | public Task Invoke(HttpContext httpContext) 21 | { 22 | 23 | return _next(httpContext); 24 | } 25 | } 26 | 27 | // Extension method used to add the middleware to the HTTP request pipeline. 28 | public static class <%= classname %>Extensions 29 | { 30 | public static IApplicationBuilder UseMiddleware(this IApplicationBuilder builder) 31 | { 32 | return builder.UseMiddleware<<%= classname %>>(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /templates/MvcController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Mvc; 6 | 7 | // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 8 | 9 | namespace <%= namespace %> 10 | { 11 | public class <%= classname %> : Controller 12 | { 13 | // GET: // 14 | public IActionResult Index() 15 | { 16 | return View(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /templates/MvcView.cshtml: -------------------------------------------------------------------------------- 1 | @* 2 | For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 3 | *@ 4 | @{ 5 | // ViewBag.Title = "<%= pagename %> Page"; 6 | } 7 | -------------------------------------------------------------------------------- /templates/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Builder; 6 | 7 | namespace <%= namespace %> 8 | { 9 | public class Startup 10 | { 11 | public void Configure(IApplicationBuilder app) 12 | { 13 | // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /templates/StyleSheet.css: -------------------------------------------------------------------------------- 1 | body { 2 | } 3 | -------------------------------------------------------------------------------- /templates/StyleSheet.less: -------------------------------------------------------------------------------- 1 | body { 2 | } 3 | -------------------------------------------------------------------------------- /templates/StyleSheet.scss: -------------------------------------------------------------------------------- 1 | body { 2 | } 3 | -------------------------------------------------------------------------------- /templates/TagHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Razor.Runtime.TagHelpers; 6 | 7 | namespace <%= namespace %> 8 | { 9 | // You may need to install the Microsoft.AspNet.Razor.Runtime package into your project 10 | [TargetElement("tag-name")] 11 | public class <%= classname %> : TagHelper 12 | { 13 | public override void Process(TagHelperContext context, TagHelperOutput output) 14 | { 15 | 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /templates/TextFile.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /templates/WebApiController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Mvc; 6 | 7 | // For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 8 | 9 | namespace <%= namespace %> 10 | { 11 | [Route("api/[controller]")] 12 | public class <%= classname %> : Controller 13 | { 14 | // GET: api/values 15 | [HttpGet] 16 | public IEnumerable Get() 17 | { 18 | return new string[] { "value1", "value2" }; 19 | } 20 | 21 | // GET api/values/5 22 | [HttpGet("{id}")] 23 | public string Get(int id) 24 | { 25 | return "value"; 26 | } 27 | 28 | // POST api/values 29 | [HttpPost] 30 | public void Post([FromBody]string value) 31 | { 32 | } 33 | 34 | // PUT api/values/5 35 | [HttpPut("{id}")] 36 | public void Put(int id, [FromBody]string value) 37 | { 38 | } 39 | 40 | // DELETE api/values/5 41 | [HttpDelete("{id}")] 42 | public void Delete(int id) 43 | { 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /templates/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MyNamespace", 3 | "private": true, 4 | "dependencies": {}, 5 | "exportsOverride": {} 6 | } 7 | -------------------------------------------------------------------------------- /templates/class.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace <%= namespace %> 7 | { 8 | public class <%= classname %> 9 | { 10 | public <%= classname %>() 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /templates/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "Data": { 3 | "DefaultConnection": { 4 | "ConnectionString": "Server=(localdb)\\MSSQLLocalDB;Database=_CHANGE_ME;Trusted_Connection=True;" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /templates/gitignore.txt: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | # DNX 42 | project.lock.json 43 | artifacts/ 44 | 45 | *_i.c 46 | *_p.c 47 | *_i.h 48 | *.ilk 49 | *.meta 50 | *.obj 51 | *.pch 52 | *.pdb 53 | *.pgc 54 | *.pgd 55 | *.rsp 56 | *.sbr 57 | *.tlb 58 | *.tli 59 | *.tlh 60 | *.tmp 61 | *.tmp_proj 62 | *.log 63 | *.vspscc 64 | *.vssscc 65 | .builds 66 | *.pidb 67 | *.svclog 68 | *.scc 69 | 70 | # Chutzpah Test files 71 | _Chutzpah* 72 | 73 | # Visual C++ cache files 74 | ipch/ 75 | *.aps 76 | *.ncb 77 | *.opensdf 78 | *.sdf 79 | *.cachefile 80 | 81 | # Visual Studio profiler 82 | *.psess 83 | *.vsp 84 | *.vspx 85 | 86 | # TFS 2012 Local Workspace 87 | $tf/ 88 | 89 | # Guidance Automation Toolkit 90 | *.gpState 91 | 92 | # ReSharper is a .NET coding add-in 93 | _ReSharper*/ 94 | *.[Rr]e[Ss]harper 95 | *.DotSettings.user 96 | 97 | # JustCode is a .NET coding add-in 98 | .JustCode 99 | 100 | # TeamCity is a build add-in 101 | _TeamCity* 102 | 103 | # DotCover is a Code Coverage Tool 104 | *.dotCover 105 | 106 | # NCrunch 107 | _NCrunch_* 108 | .*crunch*.local.xml 109 | 110 | # MightyMoose 111 | *.mm.* 112 | AutoTest.Net/ 113 | 114 | # App components for Foundation extension 115 | app/bower_components 116 | 117 | # Web workbench (sass) 118 | .sass-cache/ 119 | 120 | # Installshield output folder 121 | [Ee]xpress/ 122 | 123 | # DocProject is a documentation generator add-in 124 | DocProject/buildhelp/ 125 | DocProject/Help/*.HxT 126 | DocProject/Help/*.HxC 127 | DocProject/Help/*.hhc 128 | DocProject/Help/*.hhk 129 | DocProject/Help/*.hhp 130 | DocProject/Help/Html2 131 | DocProject/Help/html 132 | 133 | # Click-Once directory 134 | publish/ 135 | 136 | # Publish Web Output 137 | *.[Pp]ublish.xml 138 | *.azurePubxml 139 | # TODO: Comment the next line if you want to checkin your web deploy settings 140 | # but database connection strings (with potential passwords) will be unencrypted 141 | *.pubxml 142 | *.publishproj 143 | 144 | # NuGet Packages 145 | *.nupkg 146 | # The packages folder can be ignored because of Package Restore 147 | **/packages/* 148 | # except build/, which is used as an MSBuild target. 149 | !**/packages/build/ 150 | # Uncomment if necessary however generally it will be regenerated when needed 151 | #!**/packages/repositories.config 152 | 153 | # Windows Azure Build Output 154 | csx/ 155 | *.build.csdef 156 | 157 | # Windows Store app package directory 158 | AppPackages/ 159 | 160 | # Visual Studio cache files 161 | # files ending in .cache can be ignored 162 | *.[Cc]ache 163 | # but keep track of directories ending in .cache 164 | !*.[Cc]ache/ 165 | 166 | # Others 167 | ClientBin/ 168 | [Ss]tyle[Cc]op.* 169 | ~$* 170 | *~ 171 | *.dbmdl 172 | *.dbproj.schemaview 173 | *.pfx 174 | *.publishsettings 175 | node_modules/ 176 | bower_components/ 177 | orleans.codegen.cs 178 | 179 | # RIA/Silverlight projects 180 | Generated_Code/ 181 | 182 | # Backup & report files from converting an old project file 183 | # to a newer Visual Studio version. Backup files are not needed, 184 | # because we have git ;-) 185 | _UpgradeReport_Files/ 186 | Backup*/ 187 | UpgradeLog*.XML 188 | UpgradeLog*.htm 189 | 190 | # SQL Server files 191 | *.mdf 192 | *.ldf 193 | 194 | # Business Intelligence projects 195 | *.rdl.data 196 | *.bim.layout 197 | *.bim_*.settings 198 | 199 | # Microsoft Fakes 200 | FakesAssemblies/ 201 | 202 | # Node.js Tools for Visual Studio 203 | .ntvs_analysis.dat 204 | 205 | # Visual Studio 6 build log 206 | *.plg 207 | 208 | # Visual Studio 6 workspace options file 209 | *.opt 210 | -------------------------------------------------------------------------------- /templates/gulpfile.js: -------------------------------------------------------------------------------- 1 | /* 2 | This file in the main entry point for defining Gulp tasks and using Gulp plugins. 3 | Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007 4 | */ 5 | 'use strict'; 6 | 7 | var gulp = require('gulp'); 8 | 9 | gulp.task('default', function() { 10 | // place code for your default task here 11 | }); 12 | -------------------------------------------------------------------------------- /templates/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "name": "", 4 | "devDependencies": { 5 | } 6 | } -------------------------------------------------------------------------------- /templates/projects/classlib/class.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace <%= namespace %> 7 | { 8 | public class Class1 9 | { 10 | public Class1() 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /templates/projects/classlib/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "description": "<%= namespace %> Class Library", 4 | "tags": [""], 5 | "projectUrl": "", 6 | "licenseUrl": "", 7 | 8 | "dependencies": { 9 | "System.Collections": "4.0.10-beta-23019", 10 | "System.Linq": "4.0.0-beta-23019", 11 | "System.Threading": "4.0.10-beta-23019", 12 | "Microsoft.CSharp": "4.0.0-beta-23019", 13 | "System.Runtime": "4.0.20-beta-23019" 14 | }, 15 | 16 | "frameworks": { 17 | "dotnet": {} 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /templates/projects/console/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace <%= namespace %> 7 | { 8 | public class Program 9 | { 10 | public void Main(string[] args) 11 | { 12 | Console.WriteLine("Hello World"); 13 | Console.ReadLine(); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /templates/projects/console/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "description": "<%= namespace %> Console Application", 4 | "tags": [""], 5 | "projectUrl": "", 6 | "licenseUrl": "", 7 | 8 | "dependencies": {}, 9 | 10 | "commands": { 11 | "run": "run" 12 | }, 13 | 14 | "frameworks": { 15 | "dnx451": {}, 16 | "dnxcore50": { 17 | "dependencies": { 18 | "System.Collections": "4.0.10-beta-23109", 19 | "System.Console": "4.0.0-beta-23109", 20 | "System.Linq": "4.0.0-beta-23109", 21 | "System.Threading": "4.0.10-beta-23109", 22 | "Microsoft.CSharp": "4.0.0-beta-23109" 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /templates/projects/empty/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Builder; 6 | using Microsoft.AspNet.Http; 7 | using Microsoft.Framework.DependencyInjection; 8 | 9 | namespace <%= namespace %> 10 | { 11 | public class Startup 12 | { 13 | // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=398940 14 | public void ConfigureServices(IServiceCollection services) 15 | { 16 | } 17 | 18 | public void Configure(IApplicationBuilder app) 19 | { 20 | app.Run(async (context) => 21 | { 22 | await context.Response.WriteAsync("Hello World!"); 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /templates/projects/empty/hosting.ini: -------------------------------------------------------------------------------- 1 | server.urls=http://localhost:5000 2 | -------------------------------------------------------------------------------- /templates/projects/empty/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "webroot": "wwwroot", 3 | "version": "1.0.0-*", 4 | 5 | "dependencies": { 6 | "Microsoft.AspNet.Server.IIS": "1.0.0-beta6", 7 | "Microsoft.AspNet.Server.WebListener": "1.0.0-beta6", 8 | "Kestrel": "1.0.0-beta6" 9 | }, 10 | 11 | "commands": { 12 | "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --config hosting.ini", 13 | "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --config hosting.ini" 14 | }, 15 | 16 | "frameworks": { 17 | "dnx451": {}, 18 | "dnxcore50": {} 19 | }, 20 | 21 | "publishExclude": [ 22 | "node_modules", 23 | "bower_components", 24 | "**.xproj", 25 | "**.user", 26 | "**.vspscc" 27 | ], 28 | "exclude": [ 29 | "wwwroot", 30 | "node_modules", 31 | "bower_components" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /templates/projects/foundation5/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components" 3 | } -------------------------------------------------------------------------------- /templates/projects/foundation5/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 4 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /templates/projects/foundation5/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "curly": true, 4 | "eqnull": true, 5 | "eqeqeq": true, 6 | "undef": true, 7 | "unused": true, 8 | "indent": 4, 9 | "trailing": true, 10 | "browser": true, 11 | "devel": true, 12 | "strict": true, 13 | "quotmark": "single", 14 | "globals": { 15 | "jQuery": false, 16 | "$": false 17 | } 18 | } -------------------------------------------------------------------------------- /templates/projects/foundation5/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Mvc; 6 | 7 | namespace <%= namespace %>.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public IActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public IActionResult About() 17 | { 18 | ViewData["Message"] = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public IActionResult Contact() 24 | { 25 | ViewData["Message"] = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | 30 | public IActionResult Error() 31 | { 32 | return View("~/Views/Shared/Error.cshtml"); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Models/AccountViewModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.ComponentModel.DataAnnotations; 6 | using Microsoft.AspNet.Mvc.Rendering; 7 | 8 | namespace <%= namespace %>.Models 9 | { 10 | public class ExternalLoginConfirmationViewModel 11 | { 12 | [Required] 13 | [EmailAddress] 14 | public string Email { get; set; } 15 | } 16 | 17 | public class SendCodeViewModel 18 | { 19 | public string SelectedProvider { get; set; } 20 | 21 | public ICollection Providers { get; set; } 22 | 23 | public string ReturnUrl { get; set; } 24 | 25 | public bool RememberMe { get; set; } 26 | } 27 | 28 | public class VerifyCodeViewModel 29 | { 30 | [Required] 31 | public string Provider { get; set; } 32 | 33 | [Required] 34 | public string Code { get; set; } 35 | 36 | public string ReturnUrl { get; set; } 37 | 38 | [Display(Name = "Remember this browser?")] 39 | public bool RememberBrowser { get; set; } 40 | 41 | [Display(Name = "Remember me?")] 42 | public bool RememberMe { get; set; } 43 | } 44 | 45 | public class ResetPasswordViewModel 46 | { 47 | [Required] 48 | [EmailAddress] 49 | public string Email { get; set; } 50 | 51 | [Required] 52 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 53 | [DataType(DataType.Password)] 54 | public string Password { get; set; } 55 | 56 | [DataType(DataType.Password)] 57 | [Display(Name = "Confirm password")] 58 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 59 | public string ConfirmPassword { get; set; } 60 | 61 | public string Code { get; set; } 62 | } 63 | 64 | public class ForgotPasswordViewModel 65 | { 66 | [Required] 67 | [EmailAddress] 68 | public string Email { get; set; } 69 | } 70 | 71 | public class LoginViewModel 72 | { 73 | [Required] 74 | [EmailAddress] 75 | public string Email { get; set; } 76 | 77 | [Required] 78 | [DataType(DataType.Password)] 79 | public string Password { get; set; } 80 | 81 | [Display(Name = "Remember me?")] 82 | public bool RememberMe { get; set; } 83 | } 84 | 85 | public class RegisterViewModel 86 | { 87 | [Required] 88 | [EmailAddress] 89 | [Display(Name = "Email")] 90 | public string Email { get; set; } 91 | 92 | [Required] 93 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 94 | [DataType(DataType.Password)] 95 | [Display(Name = "Password")] 96 | public string Password { get; set; } 97 | 98 | [DataType(DataType.Password)] 99 | [Display(Name = "Confirm password")] 100 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 101 | public string ConfirmPassword { get; set; } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Identity; 6 | using Microsoft.AspNet.Identity.EntityFramework; 7 | using Microsoft.Data.Entity; 8 | using Microsoft.Data.Entity.InMemory; 9 | using Microsoft.Data.Entity.Metadata; 10 | using Microsoft.Framework.OptionsModel; 11 | 12 | namespace <%= namespace %>.Models 13 | { 14 | // Add profile data for application users by adding properties to the ApplicationUser class 15 | public class ApplicationUser : IdentityUser 16 | { 17 | } 18 | 19 | public class ApplicationDbContext : IdentityDbContext 20 | { 21 | protected override void OnModelCreating(ModelBuilder builder) 22 | { 23 | base.OnModelCreating(builder); 24 | // Customize the ASP.NET Identity model and override the defaults if needed. 25 | // For example, you can rename the ASP.NET Identity table names and more. 26 | // Add your customizations after calling base.OnModelCreating(builder); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Models/ManageViewModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.ComponentModel.DataAnnotations; 6 | using Microsoft.AspNet.Http.Authentication; 7 | using Microsoft.AspNet.Identity; 8 | using Microsoft.AspNet.Mvc.Rendering; 9 | 10 | namespace <%= namespace %>.Models 11 | { 12 | public class IndexViewModel 13 | { 14 | public bool HasPassword { get; set; } 15 | 16 | public IList Logins { get; set; } 17 | 18 | public string PhoneNumber { get; set; } 19 | 20 | public bool TwoFactor { get; set; } 21 | 22 | public bool BrowserRemembered { get; set; } 23 | } 24 | 25 | public class ManageLoginsViewModel 26 | { 27 | public IList CurrentLogins { get; set; } 28 | 29 | public IList OtherLogins { get; set; } 30 | } 31 | 32 | public class FactorViewModel 33 | { 34 | public string Purpose { get; set; } 35 | } 36 | 37 | public class SetPasswordViewModel 38 | { 39 | [Required] 40 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 41 | [DataType(DataType.Password)] 42 | [Display(Name = "New password")] 43 | public string NewPassword { get; set; } 44 | 45 | [DataType(DataType.Password)] 46 | [Display(Name = "Confirm new password")] 47 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 48 | public string ConfirmPassword { get; set; } 49 | } 50 | 51 | public class ChangePasswordViewModel 52 | { 53 | [Required] 54 | [DataType(DataType.Password)] 55 | [Display(Name = "Current password")] 56 | public string OldPassword { get; set; } 57 | 58 | [Required] 59 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 60 | [DataType(DataType.Password)] 61 | [Display(Name = "New password")] 62 | public string NewPassword { get; set; } 63 | 64 | [DataType(DataType.Password)] 65 | [Display(Name = "Confirm new password")] 66 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 67 | public string ConfirmPassword { get; set; } 68 | } 69 | 70 | 71 | public class AddPhoneNumberViewModel 72 | { 73 | [Required] 74 | [Phone] 75 | [Display(Name = "Phone number")] 76 | public string PhoneNumber { get; set; } 77 | } 78 | 79 | public class VerifyPhoneNumberViewModel 80 | { 81 | [Required] 82 | public string Code { get; set; } 83 | 84 | [Required] 85 | [Phone] 86 | [Display(Name = "Phone number")] 87 | public string PhoneNumber { get; set; } 88 | } 89 | 90 | public class ConfigureTwoFactorViewModel 91 | { 92 | public string SelectedProvider { get; set; } 93 | 94 | public ICollection Providers { get; set; } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Services/MessageServices.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace <%= namespace %>.Services 7 | { 8 | // This class is used by the application to send Email and SMS 9 | // when you turn on two-factor authentication in ASP.NET Identity. 10 | // For more details see this link http://go.microsoft.com/fwlink/?LinkID=532713 11 | public class AuthMessageSender : IEmailSender, ISmsSender 12 | { 13 | public Task SendEmailAsync(string email, string subject, string message) 14 | { 15 | // Plug in your email service here to send an email. 16 | return Task.FromResult(0); 17 | } 18 | 19 | public Task SendSmsAsync(string number, string message) 20 | { 21 | // Plug in your SMS service here to send a text message. 22 | return Task.FromResult(0); 23 | } 24 | } 25 | public interface IEmailSender 26 | { 27 | Task SendEmailAsync(string email, string subject, string message); 28 | } 29 | 30 | public interface ISmsSender 31 | { 32 | Task SendSmsAsync(string number, string message); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Confirm Email"; 3 | } 4 | 5 |

@ViewData["Title"].

6 |
7 |

8 | Thank you for confirming your email. Please Click here to Log in. 9 |

10 |
11 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/ExternalLoginConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @model ExternalLoginConfirmationViewModel 2 | @{ 3 | ViewData["Title"] = "Register"; 4 | } 5 | 6 |

@ViewData["Title"].

7 |

Associate your @ViewData["LoginProvider"] account.

8 | 9 |
10 |

Association Form

11 |
12 |
13 | 14 |

15 | You've successfully authenticated with @ViewData["LoginProvider"]. 16 | Please enter a user name for this site below and click the Register button to finish 17 | logging in. 18 |

19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 |
28 | 29 |
30 |
31 |
32 | 33 | @section Scripts { 34 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 35 | } 36 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewData["Title"].

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model ForgotPasswordViewModel 2 | @{ 3 | ViewData["Title"] = "Forgot your password?"; 4 | } 5 | 6 |

@ViewData["Title"].

7 |

8 | For more information on how to enable reset password please see this article. 9 |

10 | 11 | @*
12 |

Enter your email.

13 |
14 |
15 |
16 | 17 |
18 | 19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
*@ 28 | 29 | @section Scripts { 30 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 31 | } 32 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Forgot Password Confirmation"; 3 | } 4 | 5 |

@ViewData["Title"].

6 |

7 | Please check your email to reset your password. 8 |

9 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Locked out"; 3 | } 4 | 5 |
6 |

Locked out.

7 |

This account has been locked out, please try again later.

8 |
9 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/Login.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Collections.Generic 2 | @using Microsoft.AspNet.Http 3 | @using Microsoft.AspNet.Http.Authentication 4 | @model LoginViewModel 5 | @inject SignInManager SignInManager 6 | 7 | @{ 8 | ViewData["Title"] = "Log in"; 9 | } 10 | 11 |

@ViewData["Title"].

12 |
13 |
14 |
15 |
16 |

Use a local account to log in.

17 |
18 |
19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 |
33 |
34 |
35 |
36 | 37 | 38 |
39 |
40 |
41 |
42 |
43 | 44 |
45 |
46 |

47 | Register as a new user? 48 |

49 |

50 | Forgot your password? 51 |

52 |
53 |
54 |
55 |
56 |
57 |

Use another service to log in.

58 |
59 | @{ 60 | var loginProviders = SignInManager.GetExternalAuthenticationSchemes().ToList(); 61 | if (loginProviders.Count == 0) 62 | { 63 |
64 |

65 | There are no external authentication services configured. See this article 66 | for details on setting up this ASP.NET application to support logging in via external services. 67 |

68 |
69 | } 70 | else 71 | { 72 |
73 |
74 |

75 | @foreach (var provider in loginProviders) 76 | { 77 | 78 | } 79 |

80 |
81 |
82 | } 83 | } 84 |
85 |
86 |
87 | 88 | @section Scripts { 89 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 90 | } 91 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model RegisterViewModel 2 | @{ 3 | ViewData["Title"] = "Register"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 |

Create a new account.

10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 |
18 |
19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 |
33 |
34 |
35 | 36 |
37 |
38 |
39 | 40 | @section Scripts { 41 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 42 | } 43 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/ResetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model ResetPasswordViewModel 2 | @{ 3 | ViewData["Title"] = "Reset password"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 |

Reset your password.

10 |
11 |
12 | 13 |
14 | 15 |
16 | 17 | 18 |
19 |
20 |
21 | 22 |
23 | 24 | 25 |
26 |
27 |
28 | 29 |
30 | 31 | 32 |
33 |
34 |
35 |
36 | 37 |
38 |
39 |
40 | 41 | @section Scripts { 42 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 43 | } 44 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Reset password confirmation"; 3 | } 4 | 5 |

@ViewData["Title"].

6 |

7 | Your password has been reset. Please Click here to log in. 8 |

9 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model SendCodeViewModel 2 | @{ 3 | ViewData["Title"] = "Send Verification Code"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 | 10 |
11 |
12 | Select Two-Factor Authentication Provider: 13 | 14 | 15 |
16 |
17 |
18 | 19 | @section Scripts { 20 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 21 | } 22 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Account/VerifyCode.cshtml: -------------------------------------------------------------------------------- 1 | @model VerifyCodeViewModel 2 | @{ 3 | ViewData["Title"] = "Verify"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 |
10 | 11 | 12 |

@ViewData["Status"]

13 |
14 |
15 | 16 |
17 | 18 | 19 |
20 |
21 |
22 |
23 |
24 | 25 | 26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 |
35 | 36 | @section Scripts { 37 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 38 | } 39 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "About"; 3 | } 4 |

@ViewData["Title"].

5 |

@ViewData["Message"]

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Contact"; 3 | } 4 |

@ViewData["Title"].

5 |

@ViewData["Message"]

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
18 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Manage/AddPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model AddPhoneNumberViewModel 2 | @{ 3 | ViewData["Title"] = "Add Phone Number"; 4 | } 5 | 6 |

@ViewData["Title"].

7 |
8 |

Add a phone number.

9 |
10 |
11 |
12 | 13 |
14 | 15 | 16 |
17 |
18 |
19 |
20 | 21 |
22 |
23 |
24 | 25 | @section Scripts { 26 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 27 | } 28 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Manage/ChangePassword.cshtml: -------------------------------------------------------------------------------- 1 | @model ChangePasswordViewModel 2 | @{ 3 | ViewData["Title"] = "Change Password"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 |

Change Password Form

10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 |
18 |
19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 |
33 |
34 |
35 | 36 |
37 |
38 |
39 | 40 | @section Scripts { 41 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 42 | } 43 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Manage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IndexViewModel 2 | @{ 3 | ViewData["Title"] = "Manage your account"; 4 | } 5 | 6 |

@ViewData["Title"].

7 |

@ViewData["StatusMessage"]

8 |
9 |

Change your account settings

10 |
11 |
12 |
Password:
13 |
14 | [ 15 | @if (Model.HasPassword) 16 | { 17 | Change 18 | } 19 | else 20 | { 21 | Create 22 | } 23 | ] 24 |
25 |
External Logins:
26 |
27 | 28 | @Model.Logins.Count [Manage] 29 |
30 | 31 | 32 |
Phone Number:
33 |
34 |

35 | Phone Numbers can used as a second factor of verification in two-factor authentication. 36 | See this article 37 | for details on setting up this ASP.NET application to support two-factor authentication using SMS. 38 |

39 | @*@(Model.PhoneNumber ?? "None") [ 40 | @if (Model.PhoneNumber != null) 41 | { 42 | Change 43 | @:  |  44 | Remove 45 | } 46 | else 47 | { 48 | Add 49 | } 50 | ]*@ 51 |
52 | 53 |
Two-Factor Authentication:
54 |
55 |

56 | There are no two-factor authentication providers configured. See this article 57 | for setting up this application to support two-factor authentication. 58 |

59 | @*@if (Model.TwoFactor) 60 | { 61 |
62 | 63 | Enabled 64 | 65 | 66 |
67 | } 68 | else 69 | { 70 |
71 | 72 | Disabled 73 | 74 | 75 |
76 | }*@ 77 |
78 |
79 |
80 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Manage/ManageLogins.cshtml: -------------------------------------------------------------------------------- 1 | @model ManageLoginsViewModel 2 | @using Microsoft.AspNet.Http.Authentication 3 | @{ 4 | ViewData["Title"] = "Manage your external logins"; 5 | } 6 | 7 |

@ViewData["Title"].

8 | 9 |

@ViewData["StatusMessage"]

10 | @if (Model.CurrentLogins.Count > 0) 11 | { 12 |

Registered Logins

13 | 14 | 15 | @foreach (var account in Model.CurrentLogins) 16 | { 17 | 18 | 19 | 35 | 36 | } 37 | 38 |
@account.LoginProvider 20 | @if ((bool)ViewData["ShowRemoveButton"]) 21 | { 22 |
23 |
24 | 25 | 26 | 27 |
28 |
29 | } 30 | else 31 | { 32 | @:   33 | } 34 |
39 | } 40 | @if (Model.OtherLogins.Count > 0) 41 | { 42 |

Add another service to log in.

43 |
44 |
45 |
46 |

47 | @foreach (var provider in Model.OtherLogins) 48 | { 49 | 50 | } 51 |

52 |
53 |
54 | } 55 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Manage/RemoveLogin.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | @{ 3 | ViewData["Title"] = "Remove Login"; 4 | } 5 | 6 | @if (Model.Count > 0) 7 | { 8 |

Registered Logins

9 | 10 | 11 | @foreach (var account in Model) 12 | { 13 | 14 | 15 | 31 | 32 | } 33 | 34 |
@account.LoginProvider 16 | @if ((bool)ViewData["ShowRemoveButton"]) 17 | { 18 |
19 |
20 | 21 | 22 | 23 |
24 |
25 | } 26 | else 27 | { 28 | @:   29 | } 30 |
35 | } 36 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Manage/SetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model SetPasswordViewModel 2 | @{ 3 | ViewData["Title"] = "Set Password"; 4 | } 5 | 6 |

7 | You do not have a local username/password for this site. Add a local 8 | account so you can log in without an external login. 9 |

10 | 11 |
12 |

Set your password

13 |
14 |
15 |
16 | 17 |
18 | 19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 | 27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 |
35 | 36 | @section Scripts { 37 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 38 | } 39 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Manage/VerifyPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model VerifyPhoneNumberViewModel 2 | @{ 3 | ViewData["Title"] = "Verify Phone Number"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 | 10 |

Add a phone number.

11 |
@ViewData["Status"]
12 |
13 |
14 |
15 | 16 |
17 | 18 | 19 |
20 |
21 |
22 |
23 | 24 |
25 |
26 |
27 | 28 | @section Scripts { 29 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 30 | } 31 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Error"; 3 | } 4 | 5 |

Error.

6 |

An error occurred while processing your request.

7 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewData["Title"] - <%= namespace %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 20 | 21 | 22 | 23 | 24 | 44 |
45 | @RenderBody() 46 |
47 |
48 |

© 2015 - <%= namespace %>

49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 64 | 68 | 72 | 76 | 77 | 78 | 79 | @RenderSection("scripts", required: false) 80 | 81 | 82 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Security.Claims 2 | 3 | @if (User.Identity.IsAuthenticated) 4 | { 5 | 13 | } 14 | else 15 | { 16 | 20 | } 21 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using <%= namespace %> 2 | @using <%= namespace %>.Models 3 | @using Microsoft.AspNet.Identity 4 | @addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" 5 | -------------------------------------------------------------------------------- /templates/projects/foundation5/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /templates/projects/foundation5/_footer.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /templates/projects/foundation5/_gulp_package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "name": "<%= applicationname %>", 4 | "scripts": { 5 | "init": "npm install", 6 | "install": "gulp bower:install" 7 | }, 8 | "devDependencies": { 9 | "del": "^1.1.1", 10 | "gulp": "^3.8.10", 11 | "gulp-bower": "0.0.10" 12 | } 13 | } -------------------------------------------------------------------------------- /templates/projects/foundation5/_gulp_project.json: -------------------------------------------------------------------------------- 1 | { 2 | "webroot": "wwwroot", 3 | "version": "1.0.0-*", 4 | "dependencies": { 5 | "EntityFramework.SqlServer": "7.0.0-beta3", 6 | "EntityFramework.Commands": "7.0.0-beta3", 7 | "Microsoft.AspNet.Mvc": "6.0.0-beta3", 8 | "Microsoft.AspNet.Diagnostics": "1.0.0-beta3", 9 | "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta3", 10 | "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta3", 11 | "Microsoft.AspNet.Security.Cookies": "1.0.0-beta3", 12 | "Microsoft.AspNet.Server.IIS": "1.0.0-beta3", 13 | "Microsoft.AspNet.Server.WebListener": "1.0.0-beta3", 14 | "Microsoft.AspNet.StaticFiles": "1.0.0-beta3", 15 | "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta3", 16 | "Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta3", 17 | "Microsoft.Framework.Logging": "1.0.0-beta3", 18 | "Microsoft.Framework.Logging.Console": "1.0.0-beta3", 19 | "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta3", 20 | "EntityFramework.InMemory": "7.0.0-beta3", 21 | "Kestrel": "1.0.0-beta3" 22 | }, 23 | "commands": { 24 | "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001", 25 | "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004", 26 | "gen": "Microsoft.Framework.CodeGeneration", 27 | "ef": "EntityFramework.Commands" 28 | }, 29 | "frameworks": { 30 | "aspnet50": {}, 31 | "aspnetcore50": {} 32 | }, 33 | "exclude": [ 34 | "wwwroot", 35 | "node_modules", 36 | "bower_components" 37 | ], 38 | "bundleExclude": [ 39 | "node_modules", 40 | "bower_components", 41 | "**.kproj", 42 | "**.user", 43 | "**.vspscc" 44 | ], 45 | "scripts": { 46 | "postrestore": ["npm install"], 47 | "prepare": ["gulp bower:install"] 48 | } 49 | } -------------------------------------------------------------------------------- /templates/projects/foundation5/_gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var bower = require('gulp-bower'); 3 | var del = require('del'); 4 | var project = require('./project.json'); 5 | var lib = project.webroot + '/lib'; 6 | 7 | gulp.task('default', ['bower:install'], function () { 8 | return; 9 | }); 10 | 11 | gulp.task('bower:install', ['clean'], function () { 12 | return bower({ 13 | directory: lib 14 | }); 15 | }); 16 | 17 | gulp.task('clean', function (done) { 18 | del(lib, done); 19 | }); -------------------------------------------------------------------------------- /templates/projects/foundation5/_header.cshtml: -------------------------------------------------------------------------------- 1 |  <% if (fontAwesome) { %> 2 | <% } %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /templates/projects/foundation5/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ASPNET-F5-<%= applicationname %>", 3 | "dependencies": { 4 | "foundation": "zurb/bower-foundation"<% if (fontAwesome) { %>, 5 | "font-awesome": "~4.3.0" <% } %>, 6 | "hammer.js": "2.0.4" 7 | } 8 | } -------------------------------------------------------------------------------- /templates/projects/foundation5/css/template_override.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/foundation5/css/template_override.css -------------------------------------------------------------------------------- /templates/projects/foundation5/jade/footer.jade: -------------------------------------------------------------------------------- 1 | // build:js js/vendor/libraries.min.js 2 | // bower:js 3 | script(src="bower_components/jquery/dist/jquery.js") 4 | script(src="bower_components/fastclick/lib/fastclick.js") 5 | // endbower 6 | // endbuild 7 | // build:js js/vendor/foundation.min.js 8 | script(src="bower_components/foundation/js/foundation/foundation.js") 9 | script(src="bower_components/foundation/js/foundation/foundation.abide.js") 10 | script(src="bower_components/foundation/js/foundation/foundation.accordion.js") 11 | script(src="bower_components/foundation/js/foundation/foundation.alert.js") 12 | script(src="bower_components/foundation/js/foundation/foundation.clearing.js") 13 | script(src="bower_components/foundation/js/foundation/foundation.dropdown.js") 14 | script(src="bower_components/foundation/js/foundation/foundation.equalizer.js") 15 | script(src="bower_components/foundation/js/foundation/foundation.interchange.js") 16 | script(src="bower_components/foundation/js/foundation/foundation.joyride.js") 17 | script(src="bower_components/foundation/js/foundation/foundation.magellan.js") 18 | script(src="bower_components/foundation/js/foundation/foundation.offcanvas.js") 19 | script(src="bower_components/foundation/js/foundation/foundation.orbit.js") 20 | script(src="bower_components/foundation/js/foundation/foundation.reveal.js") 21 | script(src="bower_components/foundation/js/foundation/foundation.slider.js") 22 | script(src="bower_components/foundation/js/foundation/foundation.tab.js") 23 | script(src="bower_components/foundation/js/foundation/foundation.tooltip.js") 24 | script(src="bower_components/foundation/js/foundation/foundation.topbar.js") 25 | // endbuild 26 | // build:js js/app.min.js 27 | script(src="js/app.js") 28 | // endbuild -------------------------------------------------------------------------------- /templates/projects/foundation5/jade/header.jade: -------------------------------------------------------------------------------- 1 | head 2 | meta(charset="utf-8") 3 | meta(name="viewport", content="width=device-width, initial-scale=1.0") 4 | title Foundation project 5 | // build:css css/libraries.min.css 6 | <% if (fontAwesome) { %> 7 | link(rel="stylesheet", href="bower_components/font-awesome/css/font-awesome.css")<% } %> 8 | // bower:css 9 | // endbower 10 | // endbuild 11 | // build:css css/app.min.css 12 | link(rel="stylesheet", href="css/app.css") 13 | link(rel="stylesheet", href="css/app_override.css") 14 | // endbuild 15 | // build:js js/vendor/modernizr.min.js 16 | script(src="bower_components/modernizr/modernizr.js") 17 | // endbuild -------------------------------------------------------------------------------- /templates/projects/foundation5/jade/index.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html(class="no-js", lang="en") 3 | include header 4 | body 5 | div.row 6 | div(class="small-12 small-centered medium-10 medium-centered large-8 large-centered columns panel radius") 7 | h1 Yo Foundation 5! 8 | ul 9 | li Sass compiling (Ruby or Node/Libsass) 10 | li Jade templating engine (option) 11 | li Publishing to dist directory 12 | li Server with LiveReload 13 | li JSHint 14 | li Grunt Bower install 15 | li Imagemin 16 | li Font Awesome (option) 17 | h1 Grunt tasks: 18 | ul 19 | li 'grunt' - watching (Sass, Server on 127.0.0.1:9000 with LiveReload) 20 | li 'grunt compile-sass' - Sass 21 | li 'grunt compile-jade' - Jade 22 | li 'grunt validate-js' - JSHint 23 | li 'grunt bower-install' - injecting bower libraries 24 | li 'grunt publish' - dist directory 25 | li 'grunt server-dist' - server on 127.0.0.1:9001 - dist directory (preview only) 26 | h2(class="text-right") 27 | a(href="https://github.com/juliancwirko/generator-zf5") 28 | <% if (fontAwesome) { %>i(class="fa fa-github")<% } else { %>span github<% } %> 29 | include footer -------------------------------------------------------------------------------- /templates/projects/foundation5/js/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var app = (function(document, $) { 4 | var docElem = document.documentElement, 5 | _userAgentInit = function() { 6 | docElem.setAttribute('data-useragent', navigator.userAgent); 7 | }, 8 | _init = function() { 9 | $(document).foundation(); 10 | // needed to use joyride 11 | // doc: http://foundation.zurb.com/docs/components/joyride.html 12 | $(document).on('click', '#start-jr', function () { 13 | $(document).foundation('joyride', 'start'); 14 | }); 15 | _userAgentInit(); 16 | }; 17 | return { 18 | init: _init 19 | }; 20 | })(document, jQuery); 21 | 22 | (function() { 23 | app.init(); 24 | })(); 25 | -------------------------------------------------------------------------------- /templates/projects/foundation5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ASPNET-F5-<%= applicationname %>", 3 | "description": "The most amazing Foundation template for Visual Studio Vnext", 4 | "version": "0.0.10", 5 | "repository": "xtianus79/generator-aspnet", 6 | "homepage": "https://github.com/xtianus79/generator-aspnet", 7 | "author": { 8 | "name": "Christian", 9 | "email": "xtianus@live.com" 10 | }, 11 | "devDependencies": { 12 | "load-grunt-tasks": "~3.1.0", 13 | "grunt-bower-task": "0.4.0",<% if (!compass) { %> 14 | "node-sass": "~2.0.1", 15 | "grunt-sass": "~0.18.0",<% } else { %> 16 | "grunt-contrib-sass": "~0.9.2",<% } %> 17 | "grunt": "~0.4.5",<% if (jade) { %> 18 | "grunt-contrib-jade": "~0.14.1",<% } %> 19 | "grunt-contrib-watch": "~0.6.1", 20 | "grunt-contrib-clean": "~0.6.0", 21 | "grunt-contrib-copy": "~0.8.0", 22 | "grunt-contrib-cssmin": "~0.12.2", 23 | "grunt-contrib-uglify": "~0.8.0", 24 | "grunt-contrib-concat": "~0.5.1", 25 | "grunt-contrib-jshint": "~0.11.0", 26 | "grunt-contrib-connect": "~0.9.0", 27 | "grunt-wiredep": "~2.0.0", 28 | "grunt-usemin": "~3.0.0", 29 | "grunt-contrib-imagemin": "0.9.4", 30 | "grunt-newer": "~1.1.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /templates/projects/foundation5/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "webroot": "wwwroot", 3 | "userSecretsId": "aspnet5-<%= namespace %>-<%= guid %>", 4 | "version": "1.0.0-*", 5 | 6 | "dependencies": { 7 | "EntityFramework.SqlServer": "7.0.0-beta4", 8 | "EntityFramework.Commands": "7.0.0-beta4", 9 | "Microsoft.AspNet.Mvc": "6.0.0-beta4", 10 | "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta4", 11 | "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta4", 12 | "Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta4", 13 | "Microsoft.AspNet.Authentication.Google": "1.0.0-beta4", 14 | "Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta4", 15 | "Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta4", 16 | "Microsoft.AspNet.Diagnostics": "1.0.0-beta4", 17 | "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta4", 18 | "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta4", 19 | "Microsoft.AspNet.Server.IIS": "1.0.0-beta4", 20 | "Microsoft.AspNet.Server.WebListener": "1.0.0-beta4", 21 | "Microsoft.AspNet.StaticFiles": "1.0.0-beta4", 22 | "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta4", 23 | "Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4", 24 | "Microsoft.Framework.ConfigurationModel.UserSecrets": "1.0.0-beta4", 25 | "Microsoft.Framework.CodeGenerators.Mvc": "1.0.0-beta4", 26 | "Microsoft.Framework.Logging": "1.0.0-beta4", 27 | "Microsoft.Framework.Logging.Console": "1.0.0-beta4", 28 | "Kestrel": "1.0.0-beta4" 29 | }, 30 | 31 | "commands": { 32 | "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000", 33 | "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5001", 34 | "gen": "Microsoft.Framework.CodeGeneration", 35 | "ef": "EntityFramework.Commands" 36 | }, 37 | 38 | "frameworks": { 39 | "dnx451": {}, 40 | "dnxcore50": {} 41 | }, 42 | 43 | "exclude": [ 44 | "wwwroot", 45 | "node_modules", 46 | "bower_components" 47 | ], 48 | "publishExclude": [ 49 | "node_modules", 50 | "bower_components", 51 | "**.xproj", 52 | "**.user", 53 | "**.vspscc" 54 | ], 55 | "scripts": { 56 | "postrestore": ["npm install"], 57 | "prepare": ["bower install", "grunt bower-install"] 58 | } 59 | } -------------------------------------------------------------------------------- /templates/projects/foundation5/scss/_appstyles.scss: -------------------------------------------------------------------------------- 1 | /* all app scss styles here */ 2 | <% if (compass) { %> 3 | @import "compass/css3"; 4 | @import "compass/utilities"; 5 | <% } %> -------------------------------------------------------------------------------- /templates/projects/foundation5/scss/app.scss: -------------------------------------------------------------------------------- 1 | // Foundation by ZURB 2 | // foundation.zurb.com 3 | // Licensed under MIT Open Source 4 | 5 | @import "normalize"; 6 | @import "settings"; 7 | 8 | // Make sure the charset is set appropriately 9 | @charset "UTF-8"; 10 | 11 | // Behold, here are all the Foundation components. 12 | @import "foundation/components/grid"; 13 | @import "foundation/components/accordion"; 14 | @import "foundation/components/alert-boxes"; 15 | @import "foundation/components/block-grid"; 16 | @import "foundation/components/breadcrumbs"; 17 | @import "foundation/components/button-groups"; 18 | @import "foundation/components/buttons"; 19 | @import "foundation/components/clearing"; 20 | @import "foundation/components/dropdown"; 21 | @import "foundation/components/dropdown-buttons"; 22 | @import "foundation/components/flex-video"; 23 | @import "foundation/components/forms"; 24 | @import "foundation/components/icon-bar"; 25 | @import "foundation/components/inline-lists"; 26 | @import "foundation/components/joyride"; 27 | @import "foundation/components/keystrokes"; 28 | @import "foundation/components/labels"; 29 | @import "foundation/components/magellan"; 30 | @import "foundation/components/orbit"; 31 | @import "foundation/components/pagination"; 32 | @import "foundation/components/panels"; 33 | @import "foundation/components/pricing-tables"; 34 | @import "foundation/components/progress-bars"; 35 | @import "foundation/components/range-slider"; 36 | @import "foundation/components/reveal"; 37 | @import "foundation/components/side-nav"; 38 | @import "foundation/components/split-buttons"; 39 | @import "foundation/components/sub-nav"; 40 | @import "foundation/components/switches"; 41 | @import "foundation/components/tables"; 42 | @import "foundation/components/tabs"; 43 | @import "foundation/components/thumbs"; 44 | @import "foundation/components/tooltips"; 45 | @import "foundation/components/top-bar"; 46 | @import "foundation/components/type"; 47 | @import "foundation/components/offcanvas"; 48 | @import "foundation/components/visibility"; 49 | 50 | @import "appstyles"; -------------------------------------------------------------------------------- /templates/projects/foundation5/wwwroot/_references.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | /// 8 | /// 9 | -------------------------------------------------------------------------------- /templates/projects/foundation5/wwwroot/images/ASP-NET-Banners-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/foundation5/wwwroot/images/ASP-NET-Banners-01.png -------------------------------------------------------------------------------- /templates/projects/foundation5/wwwroot/images/ASP-NET-Banners-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/foundation5/wwwroot/images/ASP-NET-Banners-02.png -------------------------------------------------------------------------------- /templates/projects/foundation5/wwwroot/images/Banner-01-Azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/foundation5/wwwroot/images/Banner-01-Azure.png -------------------------------------------------------------------------------- /templates/projects/foundation5/wwwroot/images/Banner-02-VS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/foundation5/wwwroot/images/Banner-02-VS.png -------------------------------------------------------------------------------- /templates/projects/nancy/Startup.cs: -------------------------------------------------------------------------------- 1 | namespace <%= namespace %> 2 | { 3 | using Microsoft.AspNet.Builder; 4 | using Nancy.Owin; 5 | 6 | public class Startup 7 | { 8 | public void Configure(IApplicationBuilder app) 9 | { 10 | app.UseOwin(x => x.UseNancy()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /templates/projects/nancy/homemodule.cs: -------------------------------------------------------------------------------- 1 | namespace <%= namespace %> 2 | { 3 | using Nancy; 4 | 5 | public class HomeModule : NancyModule 6 | { 7 | public HomeModule() 8 | { 9 | Get["/"] = _ => "Hello World"; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /templates/projects/nancy/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Kestrel": "1.0.0-*", 4 | "Microsoft.AspNet.Owin": "1.0.0-*", 5 | "Nancy": "1.2.0" 6 | }, 7 | "commands": { 8 | "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5001" 9 | }, 10 | "frameworks": { 11 | "dnx451": {} 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /templates/projects/unittest/SampleTest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using Xunit; 5 | 6 | namespace <%= namespace %> 7 | { 8 | public class SampleTest 9 | { 10 | [Fact] 11 | public void Test1() 12 | { 13 | Assert.True(true); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /templates/projects/unittest/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "description": "", 4 | "authors": [ "" ], 5 | "tags": [ "" ], 6 | "projectUrl": "", 7 | "licenseUrl": "", 8 | 9 | "dependencies": { 10 | "xunit": "2.1.0-beta3-build3029", 11 | "xunit.runner.dnx": "2.1.0-beta3-build99" 12 | }, 13 | "commands": { 14 | "test": "xunit.runner.dnx" 15 | }, 16 | 17 | "frameworks" : { 18 | "dnx451": { }, 19 | "dnxcore50" : { 20 | "dependencies": { 21 | "System.Collections": "4.0.10-beta-22816", 22 | "System.Linq": "4.0.0-beta-22816", 23 | "System.Threading": "4.0.10-beta-22816", 24 | "Microsoft.CSharp": "4.0.0-beta-22816" 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /templates/projects/web/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "wwwroot/lib" 3 | } 4 | -------------------------------------------------------------------------------- /templates/projects/web/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Mvc; 6 | 7 | namespace <%= namespace %>.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public IActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public IActionResult About() 17 | { 18 | ViewData["Message"] = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public IActionResult Contact() 24 | { 25 | ViewData["Message"] = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | 30 | public IActionResult Error() 31 | { 32 | return View("~/Views/Shared/Error.cshtml"); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /templates/projects/web/Gruntfile.js: -------------------------------------------------------------------------------- 1 | // This file in the main entry point for defining grunt tasks and using grunt plugins. 2 | // Click here to learn more. http://go.microsoft.com/fwlink/?LinkID=513275&clcid=0x409 3 | module.exports = function(grunt) { 4 | 'use strict'; 5 | grunt.initConfig({ 6 | bower: { 7 | install: { 8 | options: { 9 | targetDir: "wwwroot/lib", 10 | layout: "byComponent", 11 | cleanTargetDir: false, 12 | copy: false 13 | } 14 | } 15 | } 16 | }); 17 | 18 | // This command registers the default task which will install bower packages into wwwroot/lib 19 | grunt.registerTask("default", ["bower:install"]); 20 | 21 | // The following line loads the grunt plugins. 22 | // This line needs to be at the end of this this file. 23 | grunt.loadNpmTasks("grunt-bower-task"); 24 | }; 25 | -------------------------------------------------------------------------------- /templates/projects/web/Models/AccountViewModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.ComponentModel.DataAnnotations; 6 | using Microsoft.AspNet.Mvc.Rendering; 7 | 8 | namespace <%= namespace %>.Models 9 | { 10 | public class ExternalLoginConfirmationViewModel 11 | { 12 | [Required] 13 | [EmailAddress] 14 | public string Email { get; set; } 15 | } 16 | 17 | public class SendCodeViewModel 18 | { 19 | public string SelectedProvider { get; set; } 20 | 21 | public ICollection Providers { get; set; } 22 | 23 | public string ReturnUrl { get; set; } 24 | 25 | public bool RememberMe { get; set; } 26 | } 27 | 28 | public class VerifyCodeViewModel 29 | { 30 | [Required] 31 | public string Provider { get; set; } 32 | 33 | [Required] 34 | public string Code { get; set; } 35 | 36 | public string ReturnUrl { get; set; } 37 | 38 | [Display(Name = "Remember this browser?")] 39 | public bool RememberBrowser { get; set; } 40 | 41 | [Display(Name = "Remember me?")] 42 | public bool RememberMe { get; set; } 43 | } 44 | 45 | public class ResetPasswordViewModel 46 | { 47 | [Required] 48 | [EmailAddress] 49 | public string Email { get; set; } 50 | 51 | [Required] 52 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 53 | [DataType(DataType.Password)] 54 | public string Password { get; set; } 55 | 56 | [DataType(DataType.Password)] 57 | [Display(Name = "Confirm password")] 58 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 59 | public string ConfirmPassword { get; set; } 60 | 61 | public string Code { get; set; } 62 | } 63 | 64 | public class ForgotPasswordViewModel 65 | { 66 | [Required] 67 | [EmailAddress] 68 | public string Email { get; set; } 69 | } 70 | 71 | public class LoginViewModel 72 | { 73 | [Required] 74 | [EmailAddress] 75 | public string Email { get; set; } 76 | 77 | [Required] 78 | [DataType(DataType.Password)] 79 | public string Password { get; set; } 80 | 81 | [Display(Name = "Remember me?")] 82 | public bool RememberMe { get; set; } 83 | } 84 | 85 | public class RegisterViewModel 86 | { 87 | [Required] 88 | [EmailAddress] 89 | [Display(Name = "Email")] 90 | public string Email { get; set; } 91 | 92 | [Required] 93 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 94 | [DataType(DataType.Password)] 95 | [Display(Name = "Password")] 96 | public string Password { get; set; } 97 | 98 | [DataType(DataType.Password)] 99 | [Display(Name = "Confirm password")] 100 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 101 | public string ConfirmPassword { get; set; } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /templates/projects/web/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Identity; 6 | using Microsoft.AspNet.Identity.EntityFramework; 7 | using Microsoft.Data.Entity; 8 | using Microsoft.Data.Entity.InMemory; 9 | using Microsoft.Data.Entity.Metadata; 10 | using Microsoft.Framework.OptionsModel; 11 | 12 | namespace <%= namespace %>.Models 13 | { 14 | // Add profile data for application users by adding properties to the ApplicationUser class 15 | public class ApplicationUser : IdentityUser 16 | { 17 | } 18 | 19 | public class ApplicationDbContext : IdentityDbContext 20 | { 21 | protected override void OnModelCreating(ModelBuilder builder) 22 | { 23 | base.OnModelCreating(builder); 24 | // Customize the ASP.NET Identity model and override the defaults if needed. 25 | // For example, you can rename the ASP.NET Identity table names and more. 26 | // Add your customizations after calling base.OnModelCreating(builder); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /templates/projects/web/Models/ManageViewModels.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.ComponentModel.DataAnnotations; 6 | using Microsoft.AspNet.Http.Authentication; 7 | using Microsoft.AspNet.Identity; 8 | using Microsoft.AspNet.Mvc.Rendering; 9 | 10 | namespace <%= namespace %>.Models 11 | { 12 | public class IndexViewModel 13 | { 14 | public bool HasPassword { get; set; } 15 | 16 | public IList Logins { get; set; } 17 | 18 | public string PhoneNumber { get; set; } 19 | 20 | public bool TwoFactor { get; set; } 21 | 22 | public bool BrowserRemembered { get; set; } 23 | } 24 | 25 | public class ManageLoginsViewModel 26 | { 27 | public IList CurrentLogins { get; set; } 28 | 29 | public IList OtherLogins { get; set; } 30 | } 31 | 32 | public class FactorViewModel 33 | { 34 | public string Purpose { get; set; } 35 | } 36 | 37 | public class SetPasswordViewModel 38 | { 39 | [Required] 40 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 41 | [DataType(DataType.Password)] 42 | [Display(Name = "New password")] 43 | public string NewPassword { get; set; } 44 | 45 | [DataType(DataType.Password)] 46 | [Display(Name = "Confirm new password")] 47 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 48 | public string ConfirmPassword { get; set; } 49 | } 50 | 51 | public class ChangePasswordViewModel 52 | { 53 | [Required] 54 | [DataType(DataType.Password)] 55 | [Display(Name = "Current password")] 56 | public string OldPassword { get; set; } 57 | 58 | [Required] 59 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 60 | [DataType(DataType.Password)] 61 | [Display(Name = "New password")] 62 | public string NewPassword { get; set; } 63 | 64 | [DataType(DataType.Password)] 65 | [Display(Name = "Confirm new password")] 66 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 67 | public string ConfirmPassword { get; set; } 68 | } 69 | 70 | 71 | public class AddPhoneNumberViewModel 72 | { 73 | [Required] 74 | [Phone] 75 | [Display(Name = "Phone number")] 76 | public string PhoneNumber { get; set; } 77 | } 78 | 79 | public class VerifyPhoneNumberViewModel 80 | { 81 | [Required] 82 | public string Code { get; set; } 83 | 84 | [Required] 85 | [Phone] 86 | [Display(Name = "Phone number")] 87 | public string PhoneNumber { get; set; } 88 | } 89 | 90 | public class ConfigureTwoFactorViewModel 91 | { 92 | public string SelectedProvider { get; set; } 93 | 94 | public ICollection Providers { get; set; } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /templates/projects/web/README.md: -------------------------------------------------------------------------------- 1 | # Welcome to ASP.NET 5 Preview 2 | 3 | We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. 4 | 5 | ASP.NET 5 has been rearchitected to make it **lean** and **composable**. It's fully **open source** and available on [GitHub](http://go.microsoft.com/fwlink/?LinkID=517854). 6 | Your new project automatically takes advantage of modern client-side utilities like [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) and [npm](http://go.microsoft.com/fwlink/?LinkId=518005) (to add client-side libraries) and [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) (for client-side build and automation tasks). 7 | 8 | We hope you enjoy the new capabilities in ASP.NET 5 and Visual Studio 2015. 9 | The ASP.NET Team 10 | 11 | ### You've created a new ASP.NET 5 project. [Learn what's new](http://go.microsoft.com/fwlink/?LinkId=518016) 12 | 13 | ### This application consists of: 14 | * Sample pages using ASP.NET MVC 6 15 | * [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side resources 16 | * Theming using [Bootstrap](http://go.microsoft.com/fwlink/?LinkID=398939) 17 | 18 | #### NEW CONCEPTS 19 | * [The 'wwwroot' explained](http://go.microsoft.com/fwlink/?LinkId=518008) 20 | * [Configuration in ASP.NET 5](http://go.microsoft.com/fwlink/?LinkId=518012) 21 | * [Dependency Injection](http://go.microsoft.com/fwlink/?LinkId=518013) 22 | * [Razor TagHelpers](http://go.microsoft.com/fwlink/?LinkId=518014) 23 | * [Manage client packages using Gulp](http://go.microsoft.com/fwlink/?LinkID=517849) 24 | * [Develop on different platforms](http://go.microsoft.com/fwlink/?LinkID=517850) 25 | 26 | #### CUSTOMIZE APP 27 | * [Add Controllers and Views](http://go.microsoft.com/fwlink/?LinkID=398600) 28 | * [Add Data using EntityFramework](http://go.microsoft.com/fwlink/?LinkID=398602) 29 | * [Add Authentication using Identity](http://go.microsoft.com/fwlink/?LinkID=398603) 30 | * [Add real time support using SignalR](http://go.microsoft.com/fwlink/?LinkID=398606) 31 | * [Add Class library](http://go.microsoft.com/fwlink/?LinkID=398604) 32 | * [Add Web APIs with MVC 6](http://go.microsoft.com/fwlink/?LinkId=518009) 33 | * [Add client packages using Bower](http://go.microsoft.com/fwlink/?LinkID=517848) 34 | 35 | #### DEPLOY 36 | * [Run your app locally](http://go.microsoft.com/fwlink/?LinkID=517851) 37 | * [Run your app on ASP.NET Core 5](http://go.microsoft.com/fwlink/?LinkID=517852) 38 | * [Run commands in your 'project.json'](http://go.microsoft.com/fwlink/?LinkID=517853) 39 | * [Publish to Microsoft Azure Web Sites](http://go.microsoft.com/fwlink/?LinkID=398609) 40 | * [Publish to the file system](http://go.microsoft.com/fwlink/?LinkId=518019) 41 | 42 | We would love to hear your [feedback](http://go.microsoft.com/fwlink/?LinkId=518015) 43 | -------------------------------------------------------------------------------- /templates/projects/web/Services/MessageServices.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace <%= namespace %>.Services 7 | { 8 | // This class is used by the application to send Email and SMS 9 | // when you turn on two-factor authentication in ASP.NET Identity. 10 | // For more details see this link http://go.microsoft.com/fwlink/?LinkID=532713 11 | public class AuthMessageSender : IEmailSender, ISmsSender 12 | { 13 | public Task SendEmailAsync(string email, string subject, string message) 14 | { 15 | // Plug in your email service here to send an email. 16 | return Task.FromResult(0); 17 | } 18 | 19 | public Task SendSmsAsync(string number, string message) 20 | { 21 | // Plug in your SMS service here to send a text message. 22 | return Task.FromResult(0); 23 | } 24 | } 25 | public interface IEmailSender 26 | { 27 | Task SendEmailAsync(string email, string subject, string message); 28 | } 29 | 30 | public interface ISmsSender 31 | { 32 | Task SendSmsAsync(string number, string message); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Confirm Email"; 3 | } 4 | 5 |

@ViewData["Title"].

6 |
7 |

8 | Thank you for confirming your email. Please Click here to Log in. 9 |

10 |
11 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/ExternalLoginConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @model ExternalLoginConfirmationViewModel 2 | @{ 3 | ViewData["Title"] = "Register"; 4 | } 5 | 6 |

@ViewData["Title"].

7 |

Associate your @ViewData["LoginProvider"] account.

8 | 9 |
10 |

Association Form

11 |
12 |
13 | 14 |

15 | You've successfully authenticated with @ViewData["LoginProvider"]. 16 | Please enter a user name for this site below and click the Register button to finish 17 | logging in. 18 |

19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 |
28 | 29 |
30 |
31 |
32 | 33 | @section Scripts { 34 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 35 | } 36 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Login Failure"; 3 | } 4 | 5 |
6 |

@ViewData["Title"].

7 |

Unsuccessful login with service.

8 |
9 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/ForgotPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model ForgotPasswordViewModel 2 | @{ 3 | ViewData["Title"] = "Forgot your password?"; 4 | } 5 | 6 |

@ViewData["Title"].

7 |

8 | For more information on how to enable reset password please see this article. 9 |

10 | 11 | @*
12 |

Enter your email.

13 |
14 |
15 |
16 | 17 |
18 | 19 | 20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |
*@ 28 | 29 | @section Scripts { 30 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 31 | } 32 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Forgot Password Confirmation"; 3 | } 4 | 5 |

@ViewData["Title"].

6 |

7 | Please check your email to reset your password. 8 |

9 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/Lockout.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Locked out"; 3 | } 4 | 5 |
6 |

Locked out.

7 |

This account has been locked out, please try again later.

8 |
9 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/Login.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Collections.Generic 2 | @using Microsoft.AspNet.Http 3 | @using Microsoft.AspNet.Http.Authentication 4 | @model LoginViewModel 5 | @inject SignInManager SignInManager 6 | 7 | @{ 8 | ViewData["Title"] = "Log in"; 9 | } 10 | 11 |

@ViewData["Title"].

12 |
13 |
14 |
15 |
16 |

Use a local account to log in.

17 |
18 |
19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 |
33 |
34 |
35 |
36 | 37 | 38 |
39 |
40 |
41 |
42 |
43 | 44 |
45 |
46 |

47 | Register as a new user? 48 |

49 |

50 | Forgot your password? 51 |

52 |
53 |
54 |
55 |
56 |
57 |

Use another service to log in.

58 |
59 | @{ 60 | var loginProviders = SignInManager.GetExternalAuthenticationSchemes().ToList(); 61 | if (loginProviders.Count == 0) 62 | { 63 |
64 |

65 | There are no external authentication services configured. See this article 66 | for details on setting up this ASP.NET application to support logging in via external services. 67 |

68 |
69 | } 70 | else 71 | { 72 |
73 |
74 |

75 | @foreach (var provider in loginProviders) 76 | { 77 | 78 | } 79 |

80 |
81 |
82 | } 83 | } 84 |
85 |
86 |
87 | 88 | @section Scripts { 89 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 90 | } 91 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model RegisterViewModel 2 | @{ 3 | ViewData["Title"] = "Register"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 |

Create a new account.

10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 |
18 |
19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 |
33 |
34 |
35 | 36 |
37 |
38 |
39 | 40 | @section Scripts { 41 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 42 | } 43 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/ResetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model ResetPasswordViewModel 2 | @{ 3 | ViewData["Title"] = "Reset password"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 |

Reset your password.

10 |
11 |
12 | 13 |
14 | 15 |
16 | 17 | 18 |
19 |
20 |
21 | 22 |
23 | 24 | 25 |
26 |
27 |
28 | 29 |
30 | 31 | 32 |
33 |
34 |
35 |
36 | 37 |
38 |
39 |
40 | 41 | @section Scripts { 42 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 43 | } 44 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Reset password confirmation"; 3 | } 4 | 5 |

@ViewData["Title"].

6 |

7 | Your password has been reset. Please Click here to log in. 8 |

9 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/SendCode.cshtml: -------------------------------------------------------------------------------- 1 | @model SendCodeViewModel 2 | @{ 3 | ViewData["Title"] = "Send Verification Code"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 | 10 |
11 |
12 | Select Two-Factor Authentication Provider: 13 | 14 | 15 |
16 |
17 |
18 | 19 | @section Scripts { 20 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 21 | } 22 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Account/VerifyCode.cshtml: -------------------------------------------------------------------------------- 1 | @model VerifyCodeViewModel 2 | @{ 3 | ViewData["Title"] = "Verify"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 |
10 | 11 | 12 |

@ViewData["Status"]

13 |
14 |
15 | 16 |
17 | 18 | 19 |
20 |
21 |
22 |
23 |
24 | 25 | 26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 |
35 | 36 | @section Scripts { 37 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 38 | } 39 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "About"; 3 | } 4 |

@ViewData["Title"].

5 |

@ViewData["Message"]

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Contact"; 3 | } 4 |

@ViewData["Title"].

5 |

@ViewData["Message"]

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
18 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Manage/AddPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model AddPhoneNumberViewModel 2 | @{ 3 | ViewData["Title"] = "Add Phone Number"; 4 | } 5 | 6 |

@ViewData["Title"].

7 |
8 |

Add a phone number.

9 |
10 |
11 |
12 | 13 |
14 | 15 | 16 |
17 |
18 |
19 |
20 | 21 |
22 |
23 |
24 | 25 | @section Scripts { 26 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 27 | } 28 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Manage/ChangePassword.cshtml: -------------------------------------------------------------------------------- 1 | @model ChangePasswordViewModel 2 | @{ 3 | ViewData["Title"] = "Change Password"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 |

Change Password Form

10 |
11 |
12 |
13 | 14 |
15 | 16 | 17 |
18 |
19 |
20 | 21 |
22 | 23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 | 31 |
32 |
33 |
34 |
35 | 36 |
37 |
38 |
39 | 40 | @section Scripts { 41 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 42 | } 43 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Manage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model IndexViewModel 2 | @{ 3 | ViewData["Title"] = "Manage your account"; 4 | } 5 | 6 |

@ViewData["Title"].

7 |

@ViewData["StatusMessage"]

8 |
9 |

Change your account settings

10 |
11 |
12 |
Password:
13 |
14 | [ 15 | @if (Model.HasPassword) 16 | { 17 | Change 18 | } 19 | else 20 | { 21 | Create 22 | } 23 | ] 24 |
25 |
External Logins:
26 |
27 | 28 | @Model.Logins.Count [Manage] 29 |
30 | 31 | 32 |
Phone Number:
33 |
34 |

35 | Phone Numbers can used as a second factor of verification in two-factor authentication. 36 | See this article 37 | for details on setting up this ASP.NET application to support two-factor authentication using SMS. 38 |

39 | @*@(Model.PhoneNumber ?? "None") [ 40 | @if (Model.PhoneNumber != null) 41 | { 42 | Change 43 | @:  |  44 | Remove 45 | } 46 | else 47 | { 48 | Add 49 | } 50 | ]*@ 51 |
52 | 53 |
Two-Factor Authentication:
54 |
55 |

56 | There are no two-factor authentication providers configured. See this article 57 | for setting up this application to support two-factor authentication. 58 |

59 | @*@if (Model.TwoFactor) 60 | { 61 |
62 | 63 | Enabled 64 | 65 | 66 |
67 | } 68 | else 69 | { 70 |
71 | 72 | Disabled 73 | 74 | 75 |
76 | }*@ 77 |
78 |
79 |
80 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Manage/ManageLogins.cshtml: -------------------------------------------------------------------------------- 1 | @model ManageLoginsViewModel 2 | @using Microsoft.AspNet.Http.Authentication 3 | @{ 4 | ViewData["Title"] = "Manage your external logins"; 5 | } 6 | 7 |

@ViewData["Title"].

8 | 9 |

@ViewData["StatusMessage"]

10 | @if (Model.CurrentLogins.Count > 0) 11 | { 12 |

Registered Logins

13 | 14 | 15 | @foreach (var account in Model.CurrentLogins) 16 | { 17 | 18 | 19 | 35 | 36 | } 37 | 38 |
@account.LoginProvider 20 | @if ((bool)ViewData["ShowRemoveButton"]) 21 | { 22 |
23 |
24 | 25 | 26 | 27 |
28 |
29 | } 30 | else 31 | { 32 | @:   33 | } 34 |
39 | } 40 | @if (Model.OtherLogins.Count > 0) 41 | { 42 |

Add another service to log in.

43 |
44 |
45 |
46 |

47 | @foreach (var provider in Model.OtherLogins) 48 | { 49 | 50 | } 51 |

52 |
53 |
54 | } 55 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Manage/RemoveLogin.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | @{ 3 | ViewData["Title"] = "Remove Login"; 4 | } 5 | 6 | @if (Model.Count > 0) 7 | { 8 |

Registered Logins

9 | 10 | 11 | @foreach (var account in Model) 12 | { 13 | 14 | 15 | 31 | 32 | } 33 | 34 |
@account.LoginProvider 16 | @if ((bool)ViewData["ShowRemoveButton"]) 17 | { 18 |
19 |
20 | 21 | 22 | 23 |
24 |
25 | } 26 | else 27 | { 28 | @:   29 | } 30 |
35 | } 36 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Manage/SetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @model SetPasswordViewModel 2 | @{ 3 | ViewData["Title"] = "Set Password"; 4 | } 5 | 6 |

7 | You do not have a local username/password for this site. Add a local 8 | account so you can log in without an external login. 9 |

10 | 11 |
12 |

Set your password

13 |
14 |
15 |
16 | 17 |
18 | 19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 | 27 |
28 |
29 |
30 |
31 | 32 |
33 |
34 |
35 | 36 | @section Scripts { 37 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 38 | } 39 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Manage/VerifyPhoneNumber.cshtml: -------------------------------------------------------------------------------- 1 | @model VerifyPhoneNumberViewModel 2 | @{ 3 | ViewData["Title"] = "Verify Phone Number"; 4 | } 5 | 6 |

@ViewData["Title"].

7 | 8 |
9 | 10 |

Add a phone number.

11 |
@ViewData["Status"]
12 |
13 |
14 |
15 | 16 |
17 | 18 | 19 |
20 |
21 |
22 |
23 | 24 |
25 |
26 |
27 | 28 | @section Scripts { 29 | @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } 30 | } 31 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Error"; 3 | } 4 | 5 |

Error.

6 |

An error occurred while processing your request.

7 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewData["Title"] - <%= namespace %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 20 | 21 | 22 | 23 | 24 | 44 |
45 | @RenderBody() 46 |
47 |
48 |

© 2015 - <%= namespace %>

49 |
50 |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 64 | 68 | 72 | 76 | 77 | 78 | 79 | @RenderSection("scripts", required: false) 80 | 81 | 82 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Security.Claims 2 | 3 | @if (User.Identity.IsAuthenticated) 4 | { 5 | 13 | } 14 | else 15 | { 16 | 20 | } 21 | -------------------------------------------------------------------------------- /templates/projects/web/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 10 | 14 | 15 | -------------------------------------------------------------------------------- /templates/projects/web/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using <%= namespace %> 2 | @using <%= namespace %>.Models 3 | @using Microsoft.AspNet.Identity 4 | @addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" 5 | -------------------------------------------------------------------------------- /templates/projects/web/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /templates/projects/web/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= namespace %>", 3 | "private": true, 4 | "dependencies": { 5 | "bootstrap": "3.0.0", 6 | "bootstrap-touch-carousel": "0.8.0", 7 | "hammer.js": "2.0.4", 8 | "jquery": "2.1.4", 9 | "jquery-validation": "1.11.1", 10 | "jquery-validation-unobtrusive": "3.2.2" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /templates/projects/web/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "AppSettings": { 3 | "SiteTitle": "<%= namespace %>" 4 | }, 5 | "Data": { 6 | "DefaultConnection": { 7 | "ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=aspnet5-<%= namespace %>-<%= guid %>;Trusted_Connection=True;MultipleActiveResultSets=true" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /templates/projects/web/gulpfile.js: -------------------------------------------------------------------------------- 1 | /// 2 | 'use strict'; 3 | var gulp = require("gulp"), 4 | rimraf = require("rimraf"), 5 | concat = require("gulp-concat"), 6 | cssmin = require("gulp-cssmin"), 7 | uglify = require("gulp-uglify"), 8 | project = require("./project.json"); 9 | 10 | var paths = { 11 | webroot: "./" + project.webroot + "/" 12 | }; 13 | 14 | paths.js = paths.webroot + "js/**/*.js"; 15 | paths.minJs = paths.webroot + "js/**/*.min.js"; 16 | paths.css = paths.webroot + "css/**/*.css"; 17 | paths.minCss = paths.webroot + "css/**/*.min.css"; 18 | paths.concatJsDest = paths.webroot + "js/site.min.js"; 19 | paths.concatCssDest = paths.webroot + "css/site.min.css"; 20 | 21 | gulp.task("clean:js", function(cb) { 22 | rimraf(paths.concatJsDest, cb); 23 | }); 24 | 25 | gulp.task("clean:css", function(cb) { 26 | rimraf(paths.concatCssDest, cb); 27 | }); 28 | 29 | gulp.task("clean", ["clean:js", "clean:css"]); 30 | 31 | gulp.task("min:js", function() { 32 | gulp.src([paths.js, "!" + paths.minJs], { 33 | base: "." 34 | }) 35 | .pipe(concat(paths.concatJsDest)) 36 | .pipe(uglify()) 37 | .pipe(gulp.dest(".")); 38 | }); 39 | 40 | gulp.task("min:css", function() { 41 | gulp.src([paths.css, "!" + paths.minCss]) 42 | .pipe(concat(paths.concatCssDest)) 43 | .pipe(cssmin()) 44 | .pipe(gulp.dest(".")); 45 | }); 46 | 47 | gulp.task("min", ["min:js", "min:css"]); 48 | -------------------------------------------------------------------------------- /templates/projects/web/hosting.ini: -------------------------------------------------------------------------------- 1 | server.urls=http://localhost:5000 2 | -------------------------------------------------------------------------------- /templates/projects/web/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= namespace %>", 3 | "version": "0.0.0", 4 | "devDependencies": {<% if(!grunt){ %> 5 | "gulp": "3.8.11", 6 | "gulp-concat": "2.5.2", 7 | "gulp-cssmin": "0.1.7", 8 | "gulp-uglify": "1.2.0", 9 | "rimraf": "2.2.8"<% } %><% if(grunt){ %> 10 | "grunt": "0.4.5", 11 | "grunt-bower-task": "0.4.0"<% } %> 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /templates/projects/web/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "webroot": "wwwroot", 3 | "userSecretsId": "aspnet5-<%= namespace %>-<%= guid %>", 4 | "version": "1.0.0-*", 5 | 6 | "dependencies": { 7 | "EntityFramework.InMemory": "7.0.0-beta6", 8 | "EntityFramework.Commands": "7.0.0-beta6", 9 | "Microsoft.AspNet.Mvc": "6.0.0-beta6", 10 | "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta6", 11 | "Microsoft.AspNet.Authentication.Cookies": "1.0.0-beta6", 12 | "Microsoft.AspNet.Authentication.Facebook": "1.0.0-beta6", 13 | "Microsoft.AspNet.Authentication.Google": "1.0.0-beta6", 14 | "Microsoft.AspNet.Authentication.MicrosoftAccount": "1.0.0-beta6", 15 | "Microsoft.AspNet.Authentication.Twitter": "1.0.0-beta6", 16 | "Microsoft.AspNet.Diagnostics": "1.0.0-beta6", 17 | "Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta6", 18 | "Microsoft.AspNet.Identity.EntityFramework": "3.0.0-beta6", 19 | "Microsoft.AspNet.Server.IIS": "1.0.0-beta6", 20 | "Microsoft.AspNet.Server.WebListener": "1.0.0-beta6", 21 | "Microsoft.AspNet.StaticFiles": "1.0.0-beta6", 22 | "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta6", 23 | "Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta6", 24 | "Microsoft.Framework.Configuration.Json": "1.0.0-beta6", 25 | "Microsoft.Framework.Configuration.UserSecrets": "1.0.0-beta6", 26 | "Microsoft.Framework.Logging": "1.0.0-beta6", 27 | "Microsoft.Framework.Logging.Console": "1.0.0-beta6", 28 | "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta6", 29 | "Kestrel": "1.0.0-beta6" 30 | }, 31 | 32 | "commands": { 33 | "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --config hosting.ini", 34 | "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --config hosting.ini" 35 | }, 36 | 37 | "frameworks": { 38 | "dnx451": {}, 39 | "dnxcore50": {} 40 | }, 41 | 42 | "exclude": [ 43 | "wwwroot", 44 | "node_modules", 45 | "bower_components" 46 | ], 47 | "publishExclude": [ 48 | "node_modules", 49 | "bower_components", 50 | "**.xproj", 51 | "**.user", 52 | "**.vspscc" 53 | ], 54 | "scripts": { 55 | "prepublish": [ 56 | "npm install", 57 | "bower install",<% if(!grunt){ %> 58 | "gulp clean", 59 | "gulp min"<% } %><% if(grunt){ %> 60 | "grunt default"<% } %> 61 | ] 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /templates/projects/web/wwwroot/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/web/wwwroot/Thumbs.db -------------------------------------------------------------------------------- /templates/projects/web/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Wrapping element */ 7 | /* Set some basic padding to keep content from hitting the edges */ 8 | .body-content { 9 | padding-left: 15px; 10 | padding-right: 15px; 11 | } 12 | 13 | /* Set widths on the form inputs since otherwise they're 100% wide */ 14 | input, 15 | select, 16 | textarea { 17 | max-width: 280px; 18 | } 19 | 20 | /* Carousel */ 21 | .carousel-caption { 22 | z-index: 10 !important; 23 | } 24 | 25 | .carousel-caption p { 26 | font-size: 20px; 27 | line-height: 1.4; 28 | } 29 | 30 | @media (min-width: 768px) { 31 | .carousel-caption { 32 | z-index: 10 !important; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /templates/projects/web/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/web/wwwroot/favicon.ico -------------------------------------------------------------------------------- /templates/projects/web/wwwroot/images/ASP-NET-Banners-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/web/wwwroot/images/ASP-NET-Banners-01.png -------------------------------------------------------------------------------- /templates/projects/web/wwwroot/images/ASP-NET-Banners-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/web/wwwroot/images/ASP-NET-Banners-02.png -------------------------------------------------------------------------------- /templates/projects/web/wwwroot/images/Banner-01-Azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/web/wwwroot/images/Banner-01-Azure.png -------------------------------------------------------------------------------- /templates/projects/web/wwwroot/images/Banner-02-VS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/web/wwwroot/images/Banner-02-VS.png -------------------------------------------------------------------------------- /templates/projects/web/wwwroot/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/web/wwwroot/images/Thumbs.db -------------------------------------------------------------------------------- /templates/projects/web/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Write your Javascript code. 2 | -------------------------------------------------------------------------------- /templates/projects/webapi/Controllers/ValuesController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Mvc; 6 | 7 | namespace <%= namespace %>.Controllers 8 | { 9 | [Route("api/[controller]")] 10 | public class ValuesController : Controller 11 | { 12 | // GET: api/values 13 | [HttpGet] 14 | public IEnumerable Get() 15 | { 16 | return new string[] { "value1", "value2" }; 17 | } 18 | 19 | // GET api/values/5 20 | [HttpGet("{id}")] 21 | public string Get(int id) 22 | { 23 | return "value"; 24 | } 25 | 26 | // POST api/values 27 | [HttpPost] 28 | public void Post([FromBody]string value) 29 | { 30 | } 31 | 32 | // PUT api/values/5 33 | [HttpPut("{id}")] 34 | public void Put(int id, [FromBody]string value) 35 | { 36 | } 37 | 38 | // DELETE api/values/5 39 | [HttpDelete("{id}")] 40 | public void Delete(int id) 41 | { 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /templates/projects/webapi/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "IIS Express": { 4 | "commandName": "IISExpress", 5 | "launchBrowser": true, 6 | "launchUrl": "api/values", 7 | "environmentVariables": { 8 | "ASPNET_ENV": "Development" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /templates/projects/webapi/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Builder; 6 | using Microsoft.AspNet.Hosting; 7 | using Microsoft.AspNet.Http; 8 | using Microsoft.AspNet.Routing; 9 | using Microsoft.Framework.DependencyInjection; 10 | 11 | namespace <%= namespace %> 12 | { 13 | public class Startup 14 | { 15 | public Startup(IHostingEnvironment env) 16 | { 17 | } 18 | 19 | // This method gets called by a runtime. 20 | // Use this method to add services to the container 21 | public void ConfigureServices(IServiceCollection services) 22 | { 23 | services.AddMvc(); 24 | // Uncomment the following line to add Web API services which makes it easier to port Web API 2 controllers. 25 | // You will also need to add the Microsoft.AspNet.Mvc.WebApiCompatShim package to the 'dependencies' section of project.json. 26 | // services.AddWebApiConventions(); 27 | } 28 | 29 | // Configure is called after ConfigureServices is called. 30 | public void Configure(IApplicationBuilder app, IHostingEnvironment env) 31 | { 32 | // Configure the HTTP request pipeline. 33 | app.UseStaticFiles(); 34 | 35 | // Add MVC to the request pipeline. 36 | app.UseMvc(); 37 | // Add the following route for porting Web API 2 controllers. 38 | // routes.MapWebApiRoute("DefaultApi", "api/{controller}/{id?}"); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /templates/projects/webapi/hosting.ini: -------------------------------------------------------------------------------- 1 | server.urls=http://localhost:5000 2 | -------------------------------------------------------------------------------- /templates/projects/webapi/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "webroot": "wwwroot", 3 | "version": "1.0.0-*", 4 | 5 | "dependencies": { 6 | "Microsoft.AspNet.Mvc": "6.0.0-beta6", 7 | "Microsoft.AspNet.Server.IIS": "1.0.0-beta6", 8 | "Kestrel": "1.0.0-beta6", 9 | "Microsoft.AspNet.Server.WebListener": "1.0.0-beta6", 10 | "Microsoft.AspNet.StaticFiles": "1.0.0-beta6" 11 | }, 12 | 13 | "commands": { 14 | "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --config hosting.ini", 15 | "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --config hosting.ini" 16 | }, 17 | 18 | "frameworks": { 19 | "dnx451": {}, 20 | "dnxcore50": {} 21 | }, 22 | 23 | "exclude": [ 24 | "wwwroot", 25 | "node_modules", 26 | "bower_components" 27 | ], 28 | "publishExclude": [ 29 | "node_modules", 30 | "bower_components", 31 | "**.xproj", 32 | "**.user", 33 | "**.vspscc" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /templates/projects/webbasic/.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "wwwroot/lib" 3 | } 4 | -------------------------------------------------------------------------------- /templates/projects/webbasic/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Mvc; 6 | 7 | namespace <%= namespace %>.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public IActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public IActionResult About() 17 | { 18 | ViewData["Message"] = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public IActionResult Contact() 24 | { 25 | ViewData["Message"] = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | 30 | public IActionResult Error() 31 | { 32 | return View("~/Views/Shared/Error.cshtml"); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /templates/projects/webbasic/Gruntfile.js: -------------------------------------------------------------------------------- 1 | // This file in the main entry point for defining grunt tasks and using grunt plugins. 2 | // Click here to learn more. http://go.microsoft.com/fwlink/?LinkID=513275&clcid=0x409 3 | module.exports = function(grunt) { 4 | 'use strict'; 5 | grunt.initConfig({ 6 | bower: { 7 | install: { 8 | options: { 9 | targetDir: "wwwroot/lib", 10 | layout: "byComponent", 11 | cleanTargetDir: false, 12 | copy: false 13 | } 14 | } 15 | } 16 | }); 17 | 18 | // This command registers the default task which will install bower packages into wwwroot/lib 19 | grunt.registerTask("default", ["bower:install"]); 20 | 21 | // The following line loads the grunt plugins. 22 | // This line needs to be at the end of this this file. 23 | grunt.loadNpmTasks("grunt-bower-task"); 24 | }; 25 | -------------------------------------------------------------------------------- /templates/projects/webbasic/README.md: -------------------------------------------------------------------------------- 1 | # Welcome to ASP.NET 5 Preview 2 | 3 | We've made some big updates in this release, so it’s **important** that you spend a few minutes to learn what’s new. 4 | 5 | ASP.NET 5 has been rearchitected to make it **lean** and **composable**. It's fully **open source** and available on [GitHub](http://go.microsoft.com/fwlink/?LinkID=517854). 6 | Your new project automatically takes advantage of modern client-side utilities like [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) and [npm](http://go.microsoft.com/fwlink/?LinkId=518005) (to add client-side libraries) and [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) (for client-side build and automation tasks). 7 | 8 | We hope you enjoy the new capabilities in ASP.NET 5 and Visual Studio 2015. 9 | The ASP.NET Team 10 | 11 | ### You've created a new ASP.NET 5 project. [Learn what's new](http://go.microsoft.com/fwlink/?LinkId=518016) 12 | 13 | ### This application consists of: 14 | * Sample pages using ASP.NET MVC 6 15 | * [Gulp](http://go.microsoft.com/fwlink/?LinkId=518007) and [Bower](http://go.microsoft.com/fwlink/?LinkId=518004) for managing client-side resources 16 | * Theming using [Bootstrap](http://go.microsoft.com/fwlink/?LinkID=398939) 17 | 18 | #### NEW CONCEPTS 19 | * [The 'wwwroot' explained](http://go.microsoft.com/fwlink/?LinkId=518008) 20 | * [Configuration in ASP.NET 5](http://go.microsoft.com/fwlink/?LinkId=518012) 21 | * [Dependency Injection](http://go.microsoft.com/fwlink/?LinkId=518013) 22 | * [Razor TagHelpers](http://go.microsoft.com/fwlink/?LinkId=518014) 23 | * [Manage client packages using Gulp](http://go.microsoft.com/fwlink/?LinkID=517849) 24 | * [Develop on different platforms](http://go.microsoft.com/fwlink/?LinkID=517850) 25 | 26 | #### CUSTOMIZE APP 27 | * [Add Controllers and Views](http://go.microsoft.com/fwlink/?LinkID=398600) 28 | * [Add Data using EntityFramework](http://go.microsoft.com/fwlink/?LinkID=398602) 29 | * [Add Authentication using Identity](http://go.microsoft.com/fwlink/?LinkID=398603) 30 | * [Add real time support using SignalR](http://go.microsoft.com/fwlink/?LinkID=398606) 31 | * [Add Class library](http://go.microsoft.com/fwlink/?LinkID=398604) 32 | * [Add Web APIs with MVC 6](http://go.microsoft.com/fwlink/?LinkId=518009) 33 | * [Add client packages using Bower](http://go.microsoft.com/fwlink/?LinkID=517848) 34 | 35 | #### DEPLOY 36 | * [Run your app locally](http://go.microsoft.com/fwlink/?LinkID=517851) 37 | * [Run your app on ASP.NET Core 5](http://go.microsoft.com/fwlink/?LinkID=517852) 38 | * [Run commands in your 'project.json'](http://go.microsoft.com/fwlink/?LinkID=517853) 39 | * [Publish to Microsoft Azure Web Sites](http://go.microsoft.com/fwlink/?LinkID=398609) 40 | * [Publish to the file system](http://go.microsoft.com/fwlink/?LinkId=518019) 41 | 42 | We would love to hear your [feedback](http://go.microsoft.com/fwlink/?LinkId=518015) 43 | -------------------------------------------------------------------------------- /templates/projects/webbasic/Startup.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNet.Builder; 6 | using Microsoft.AspNet.Diagnostics; 7 | using Microsoft.AspNet.Hosting; 8 | using Microsoft.AspNet.Http; 9 | using Microsoft.AspNet.Routing; 10 | using Microsoft.Framework.Configuration; 11 | using Microsoft.Framework.DependencyInjection; 12 | using Microsoft.Framework.Logging; 13 | using Microsoft.Framework.Logging.Console; 14 | using Microsoft.Framework.Runtime; 15 | 16 | namespace <%= namespace %> 17 | { 18 | public class Startup 19 | { 20 | public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv) 21 | { 22 | // Setup configuration sources. 23 | var builder = new ConfigurationBuilder(appEnv.ApplicationBasePath) 24 | .AddJsonFile("config.json") 25 | .AddEnvironmentVariables(); 26 | Configuration = builder.Build(); 27 | } 28 | 29 | public IConfiguration Configuration { get; set; } 30 | 31 | // This method gets called by the runtime. 32 | public void ConfigureServices(IServiceCollection services) 33 | { 34 | // Add MVC services to the services container. 35 | services.AddMvc(); 36 | 37 | // Uncomment the following line to add Web API services which makes it easier to port Web API 2 controllers. 38 | // You will also need to add the Microsoft.AspNet.Mvc.WebApiCompatShim package to the 'dependencies' section of project.json. 39 | // services.AddWebApiConventions(); 40 | } 41 | 42 | // Configure is called after ConfigureServices is called. 43 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) 44 | { 45 | loggerFactory.MinimumLevel = LogLevel.Information; 46 | loggerFactory.AddConsole(); 47 | 48 | // Configure the HTTP request pipeline. 49 | 50 | // Add the following to the request pipeline only in development environment. 51 | if (env.IsDevelopment()) 52 | { 53 | app.UseErrorPage(); 54 | } 55 | else 56 | { 57 | // Add Error handling middleware which catches all application specific errors and 58 | // send the request to the following path or controller action. 59 | app.UseErrorHandler("/Home/Error"); 60 | } 61 | 62 | // Add static files to the request pipeline. 63 | app.UseStaticFiles(); 64 | 65 | // Add MVC to the request pipeline. 66 | app.UseMvc(routes => 67 | { 68 | routes.MapRoute( 69 | name: "default", 70 | template: "{controller=Home}/{action=Index}/{id?}"); 71 | 72 | // Uncomment the following line to add a route for porting Web API 2 controllers. 73 | // routes.MapWebApiRoute("DefaultApi", "api/{controller}/{id?}"); 74 | }); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /templates/projects/webbasic/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "About"; 3 | } 4 |

@ViewData["Title"].

5 |

@ViewData["Message"]

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /templates/projects/webbasic/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Contact"; 3 | } 4 |

@ViewData["Title"].

5 |

@ViewData["Message"]

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
18 | -------------------------------------------------------------------------------- /templates/projects/webbasic/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Error"; 3 | } 4 | 5 |

Error.

6 |

An error occurred while processing your request.

7 | -------------------------------------------------------------------------------- /templates/projects/webbasic/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | @ViewData["Title"] - <%= namespace %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 20 | 21 | 22 | 23 | 24 | 43 |
44 | @RenderBody() 45 |
46 |
47 |

© 2015 - <%= namespace %>

48 |
49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 63 | 67 | 71 | 75 | 76 | 77 | 78 | @RenderSection("scripts", required: false) 79 | 80 | 81 | -------------------------------------------------------------------------------- /templates/projects/webbasic/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using <%= namespace %> 2 | @addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers" 3 | -------------------------------------------------------------------------------- /templates/projects/webbasic/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /templates/projects/webbasic/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= namespace %>", 3 | "private": true, 4 | "dependencies": { 5 | "bootstrap": "3.0.0", 6 | "bootstrap-touch-carousel": "0.8.0", 7 | "hammer.js": "2.0.4", 8 | "jquery": "2.1.4", 9 | "jquery-validation": "1.11.1", 10 | "jquery-validation-unobtrusive": "3.2.2" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /templates/projects/webbasic/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "AppSettings": { 3 | "SiteTitle": "<%= namespace %>" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /templates/projects/webbasic/gulpfile.js: -------------------------------------------------------------------------------- 1 | /// 2 | 'use strict'; 3 | var gulp = require("gulp"), 4 | rimraf = require("rimraf"), 5 | concat = require("gulp-concat"), 6 | cssmin = require("gulp-cssmin"), 7 | uglify = require("gulp-uglify"), 8 | project = require("./project.json"); 9 | 10 | var paths = { 11 | webroot: "./" + project.webroot + "/" 12 | }; 13 | 14 | paths.js = paths.webroot + "js/**/*.js"; 15 | paths.minJs = paths.webroot + "js/**/*.min.js"; 16 | paths.css = paths.webroot + "css/**/*.css"; 17 | paths.minCss = paths.webroot + "css/**/*.min.css"; 18 | paths.concatJsDest = paths.webroot + "js/site.min.js"; 19 | paths.concatCssDest = paths.webroot + "css/site.min.css"; 20 | 21 | gulp.task("clean:js", function(cb) { 22 | rimraf(paths.concatJsDest, cb); 23 | }); 24 | 25 | gulp.task("clean:css", function(cb) { 26 | rimraf(paths.concatCssDest, cb); 27 | }); 28 | 29 | gulp.task("clean", ["clean:js", "clean:css"]); 30 | 31 | gulp.task("min:js", function() { 32 | gulp.src([paths.js, "!" + paths.minJs], { 33 | base: "." 34 | }) 35 | .pipe(concat(paths.concatJsDest)) 36 | .pipe(uglify()) 37 | .pipe(gulp.dest(".")); 38 | }); 39 | 40 | gulp.task("min:css", function() { 41 | gulp.src([paths.css, "!" + paths.minCss]) 42 | .pipe(concat(paths.concatCssDest)) 43 | .pipe(cssmin()) 44 | .pipe(gulp.dest(".")); 45 | }); 46 | 47 | gulp.task("min", ["min:js", "min:css"]); 48 | -------------------------------------------------------------------------------- /templates/projects/webbasic/hosting.ini: -------------------------------------------------------------------------------- 1 | server.urls=http://localhost:5000 2 | -------------------------------------------------------------------------------- /templates/projects/webbasic/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= namespace %>", 3 | "version": "0.0.0", 4 | "devDependencies": {<% if(!grunt){ %> 5 | "gulp": "3.8.11", 6 | "gulp-concat": "2.5.2", 7 | "gulp-cssmin": "0.1.7", 8 | "gulp-uglify": "1.2.0", 9 | "rimraf": "2.2.8"<% } %><% if(grunt){ %> 10 | "grunt": "0.4.5", 11 | "grunt-bower-task": "0.4.0"<% } %> 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /templates/projects/webbasic/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "webroot": "wwwroot", 3 | "version": "1.0.0-*", 4 | 5 | "dependencies": { 6 | "Microsoft.AspNet.Diagnostics": "1.0.0-beta6", 7 | "Microsoft.AspNet.Mvc": "6.0.0-beta6", 8 | "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta6", 9 | "Microsoft.AspNet.Server.IIS": "1.0.0-beta6", 10 | "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta6", 11 | "Microsoft.AspNet.Server.WebListener": "1.0.0-beta6", 12 | "Microsoft.AspNet.StaticFiles": "1.0.0-beta6", 13 | "Microsoft.AspNet.Tooling.Razor": "1.0.0-beta6", 14 | "Microsoft.Framework.Configuration.Json": "1.0.0-beta6", 15 | "Microsoft.Framework.Logging": "1.0.0-beta6", 16 | "Microsoft.Framework.Logging.Console": "1.0.0-beta6", 17 | "Kestrel": "1.0.0-beta6" 18 | }, 19 | 20 | "commands": { 21 | "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --config hosting.ini", 22 | "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --config hosting.ini" 23 | }, 24 | 25 | "frameworks": { 26 | "dnx451": {}, 27 | "dnxcore50": {} 28 | }, 29 | 30 | "exclude": [ 31 | "wwwroot", 32 | "node_modules", 33 | "bower_components" 34 | ], 35 | "publishExclude": [ 36 | "node_modules", 37 | "bower_components", 38 | "**.xproj", 39 | "**.user", 40 | "**.vspscc" 41 | ], 42 | "scripts": { 43 | "prepublish": [ 44 | "npm install", 45 | "bower install", <% if(!grunt){ %> 46 | "gulp clean", 47 | "gulp min"<% } %><% if(grunt){ %> 48 | "grunt default" 49 | <% } %> 50 | ] 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /templates/projects/webbasic/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Wrapping element */ 7 | /* Set some basic padding to keep content from hitting the edges */ 8 | .body-content { 9 | padding-left: 15px; 10 | padding-right: 15px; 11 | } 12 | 13 | /* Set widths on the form inputs since otherwise they're 100% wide */ 14 | input, 15 | select, 16 | textarea { 17 | max-width: 280px; 18 | } 19 | 20 | /* Carousel */ 21 | .carousel-caption { 22 | z-index: 10 !important; 23 | } 24 | 25 | .carousel-caption p { 26 | font-size: 20px; 27 | line-height: 1.4; 28 | } 29 | 30 | @media (min-width: 768px) { 31 | .carousel-caption { 32 | z-index: 10 !important; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /templates/projects/webbasic/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/webbasic/wwwroot/favicon.ico -------------------------------------------------------------------------------- /templates/projects/webbasic/wwwroot/images/ASP-NET-Banners-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/webbasic/wwwroot/images/ASP-NET-Banners-01.png -------------------------------------------------------------------------------- /templates/projects/webbasic/wwwroot/images/ASP-NET-Banners-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/webbasic/wwwroot/images/ASP-NET-Banners-02.png -------------------------------------------------------------------------------- /templates/projects/webbasic/wwwroot/images/Banner-01-Azure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/webbasic/wwwroot/images/Banner-01-Azure.png -------------------------------------------------------------------------------- /templates/projects/webbasic/wwwroot/images/Banner-02-VS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xtianus79/generator-aspnet/a33f87ca43afffa8d90467b7c584e2dd7ec578e2/templates/projects/webbasic/wwwroot/images/Banner-02-VS.png -------------------------------------------------------------------------------- /templates/projects/webbasic/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Write your Javascript code. 2 | -------------------------------------------------------------------------------- /templates/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "noImplicitAny": false, 4 | "noEmitOnError": true, 5 | "removeComments": false, 6 | "sourceMap": true, 7 | "target": "es5" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/compat.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = require('./test-utility'); 3 | 4 | /* 5 | * Check that namespace is normalized. 6 | */ 7 | describe('compat - namespace normalization', function() { 8 | util.goCreateApplication('classlib', 'name-test'); 9 | util.fileContentCheck('name-test/Class1.cs', 'namespace normalized', /^namespace name_test$/m); 10 | }); 11 | -------------------------------------------------------------------------------- /test/test-creation.js: -------------------------------------------------------------------------------- 1 | /*global describe, beforeEach, it*/ 2 | 'use strict'; 3 | 4 | var path = require('path'); 5 | var helpers = require('yeoman-generator').test; 6 | 7 | 8 | describe('aspnet-f5 generator', function () { 9 | beforeEach(function (done) { 10 | helpers.testDirectory(path.join(__dirname, 'temp'), function (err) { 11 | if (err) { 12 | return done(err); 13 | } 14 | 15 | this.app = helpers.createGenerator('aspnet-f5:app', [ 16 | '../../app' 17 | ]); 18 | done(); 19 | }.bind(this)); 20 | }); 21 | 22 | //it('creates expected files', function (done) { 23 | // var expected = [ 24 | // // add files you expect to exist here. 25 | // '.jshintrc', 26 | // '.editorconfig' 27 | // ]; 28 | 29 | // //helpers.mockPrompt(this.app, { 30 | // // 'Empty Application': true 31 | // //}); 32 | // //this.app.options['skip-install'] = true; 33 | // this.app.run({}, function () { 34 | // helpers.assertFiles(expected); 35 | // done(); 36 | // }); 37 | //}); 38 | }); 39 | -------------------------------------------------------------------------------- /test/test-utility.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | var util = (function() { 3 | 4 | var yeoman = require('yeoman-generator'); 5 | var path = require('path'); 6 | var assert; 7 | var mockGen; 8 | 9 | function goCreate(subgenerator) { 10 | before(function(done) { 11 | 12 | assert = yeoman.assert; 13 | mockGen = yeoman.test; 14 | 15 | mockGen.run(path.join(__dirname, '../' + subgenerator)) 16 | .on('end', done); 17 | }); 18 | } 19 | 20 | function goCreateWithArgs(subgenerator, args) { 21 | before(function(done) { 22 | assert = yeoman.assert; 23 | mockGen = yeoman.test; 24 | 25 | mockGen.run(path.join(__dirname, '../' + subgenerator)) 26 | .withArguments(args) 27 | .on('end', done); 28 | }); 29 | } 30 | 31 | function goCreateApplication(type, applicationName) { 32 | before(function(done) { 33 | 34 | assert = yeoman.assert; 35 | mockGen = yeoman.test; 36 | 37 | var mockPrompt = { 38 | type: type, 39 | applicationName: applicationName 40 | }; 41 | 42 | mockGen.run(path.join(__dirname, '../app')) 43 | .withPrompts(mockPrompt) 44 | .on('end', done); 45 | }); 46 | 47 | } 48 | 49 | function goCreateApplicationWithOptions(type, applicationName, options) { 50 | before(function(done) { 51 | 52 | assert = yeoman.assert; 53 | mockGen = yeoman.test; 54 | 55 | var mockPrompt = { 56 | type: type, 57 | applicationName: applicationName 58 | }; 59 | 60 | mockGen.run(path.join(__dirname, '../app')) 61 | .withPrompts(mockPrompt) 62 | .withOptions(options) 63 | .on('end', done); 64 | }); 65 | 66 | } 67 | 68 | function dirsCheck(dirs) { 69 | describe('Directories Creation', function() { 70 | for (var i = 0; i < dirs.length; i++) { 71 | /*jshint loopfunc: true */ 72 | it(dirs[i] + ' created.', function() { 73 | assert.file(dirs[i]); 74 | }); 75 | } 76 | 77 | }); 78 | 79 | } 80 | 81 | function filesCheck(file) { 82 | 83 | 84 | it(file + ' created.', function() { 85 | assert.file(file); 86 | }); 87 | 88 | } 89 | 90 | function dirCheck(message, dir) { 91 | describe('Directory Creation', function() { 92 | it(message, function() { 93 | assert.file(dir); 94 | }); 95 | }); 96 | } 97 | 98 | function fileCheck(message, file) { 99 | describe('File Creation', function() { 100 | it(message, function() { 101 | assert.file(file); 102 | }); 103 | }); 104 | } 105 | 106 | function fileContentCheck(file, message, content) { 107 | it(message, function() { 108 | assert.fileContent(file, content); 109 | }); 110 | } 111 | 112 | 113 | var methods = { 114 | goCreateApplication: goCreateApplication, 115 | goCreateApplicationWithOptions: goCreateApplicationWithOptions, 116 | goCreate: goCreate, 117 | goCreateWithArgs: goCreateWithArgs, 118 | fileCheck: fileCheck, 119 | filesCheck: filesCheck, 120 | dirCheck: dirCheck, 121 | dirsCheck: dirsCheck, 122 | fileContentCheck: fileContentCheck 123 | }; 124 | 125 | return methods; 126 | })(); 127 | 128 | module.exports = util; 129 | --------------------------------------------------------------------------------