ASP.NET 5 development with yeoman tools

14
ASP.NET 5 development with yeoman tools ANURAJ @anuraj www.dotnetthoughts.net

Transcript of ASP.NET 5 development with yeoman tools

Page 2: ASP.NET 5 development with yeoman tools

Agenda•What is Yeoman•Yeoman tools• Installing Yo•Basic scaffolding•Demo•Resources

Page 3: ASP.NET 5 development with yeoman tools

What is YeomanYeoman helps you to kick-start new projects, prescribing best practices and tools to help you stay productive. Yeoman provide a generator ecosystem. A generator is basically a plugin that can be run with the `yo` command to scaffold complete projects or useful parts.

Page 4: ASP.NET 5 development with yeoman tools

Yeoman toolsThe Yeoman workflow comprises three types of tools for improving your productivity and satisfaction when building a web app: the scaffolding tool (yo), the build tool (Grunt, Gulp, etc) and the package manager (like Bower and npm).

Page 5: ASP.NET 5 development with yeoman tools

Yeoman tools

Image copyright © http://yeoman.io/

Page 6: ASP.NET 5 development with yeoman tools

Installing yo and some generatorsFirst, you'll need to install yo and other required tools

npm install -g yo bower grunt-cli gulp

Installing ASP.NET 5 generator

npm install -g generator-aspnet

Page 7: ASP.NET 5 development with yeoman tools

Basic scaffoldingTo scaffold a web application, you'll need to install the generator-webapp generator. To scaffold ASP.NET 5 application, execute.

yo aspnet

https://github.com/OmniSharp/generator-aspnet https://www.npmjs.com/package/generator-aspnet

Page 8: ASP.NET 5 development with yeoman tools

More scaffolding - Sub generatorsTo scaffold a files you can use sub generators

yo aspnet:middlewareyo aspnet:MvcController

yo aspnet --help to get more details

Page 9: ASP.NET 5 development with yeoman tools

Available Sub generatorsaspnet:AngularControlleraspnet:AngularControllerAsaspnet:AngularDirectiveaspnet:AngularFactoryaspnet:AngularModuleaspnet:AppSettingsaspnet:BowerJsonaspnet:Classaspnet:CoffeeScript

aspnet:Dockerfileaspnet:gitignoreaspnet:Gruntfileaspnet:Gulpfileaspnet:HTMLPageaspnet:Interfaceaspnet:JavaScriptaspnet:JScriptaspnet:JSON

aspnet:JSONSchemaaspnet:JSXaspnet:Middlewareaspnet:MvcControlleraspnet:MvcViewaspnet:nugetaspnet:PackageJsonaspnet:StartupClassaspnet:StyleSheet

aspnet:StyleSheetLessaspnet:StyleSheetScssaspnet:TagHelperaspnet:TextFileaspnet:tfignoreaspnet:TypeScriptaspnet:TypeScriptConfigaspnet:WebApiContoller

https://www.npmjs.com/package/generator-aspnet#sub-generators

Page 10: ASP.NET 5 development with yeoman tools

Basic scaffolding – ASPNET 5

Image copyright © https://www.npmjs.com/package/generator-aspnet

Page 11: ASP.NET 5 development with yeoman tools

Demo1. ASP.NET Web Application with yeoman2. ASP.NET Middleware with yeoman

Page 12: ASP.NET 5 development with yeoman tools

Resources1. http://yeoman.io/2. https://github.com/OmniSharp/generator-

aspnet

3. http://yeoman.io/generators/

Page 13: ASP.NET 5 development with yeoman tools

Questions?

Page 14: ASP.NET 5 development with yeoman tools

Thank you