diandsonc
4/6/2017 - 7:59 PM

Commander Programming

Commander Programming

#--------------------------------------------------------------------------------------
#	PROGRAMS
#--------------------------------------------------------------------------------------
Node.js with NPM (Node Package Manager) 		#https://nodejs.org/en/download/
Angular-CLI (Command Line Interface) 			  #https://cli.angular.io/
Loreim Imagem 									            #http://lorempixel.com/400/200/nature/
Bootstrap 										              #http://valor-software.com/ngx-bootstrap/

#--------------------------------------------------------------------------------------
#	MIGRATIONS .NET CORE
#--------------------------------------------------------------------------------------
dotnet ef migrations add InitialCreate
dotnet ef migrations remove
dotnet ef database update
dotnet ef database update "<previous-migration-name>"

#--------------------------------------------------------------------------------------
#	VISUAL STUDIO CODE
#--------------------------------------------------------------------------------------
Angular v4 TypeScript Snippets 					#install plugin of johnpapa.Angular2
Color Picker									          #install plugin of anseki.vscode-color
HTML Snippets									          #install plugin of abusaidm.html-snippets
vscode-icons								  	        #install plugin of robertohuertasm.vscode-icons
minify											            #install plugin of HookyQR.minify
Dracula Oficial									        #install theme of dracula-theme.theme-dracula
Auto Import										          #install plugin of steoates.autoimport
Auto Import - ES6								        #install plugin of moppitz.vscode-extension-auto-import
C#                              				#install plugin of ms-vscode
Code Runner                      				#install plugin of formulahendry
C# XML Documentation               			#install plugin of k--kato
C# Extensions                     			#install plugin of jchannon

#--------------------------------------------------------------------------------------
#	DOT NET CORE
#--------------------------------------------------------------------------------------
dotnet --info									                            #check if you have dotnet installed
dotnet new --install Microsoft.AspNetCore.SpaTemplates::* #Single Page Application templates for ASP.NET Core
dotnet new angular -n ProjectName				                  #on project directory to create project
dotnet restore									                          #Restores the dependencies and tools of a project.
dotnet build									                            #Builds a project and all of its dependencies.
dotnet clean 									                            #Cleans the output of a project.
dotnet run										                            #Runs source code without any explicit compile or launch commands. Port 5200
dotnet vstest 									                          #Runs tests from the specified files.
dotnet publish -c Release -r win10-x64  		              #public version RUNTIME_IDENTIFIER
dotnet publish -c Release -o v2.4.3-beta8 		            #public version OUTPUT_DIRECTORY
code . 											                              #open visual studio code

#--------------------------------------------------------------------------------------
#	ANGULAR 4
#--------------------------------------------------------------------------------------
node -v 										                  #check if you have Node.js installed
npm -v											                  #confirm that you have npm installed
npm install http-server -g 						        #create a server
http-serve 										                #start server
npm install npm@latest -g 						        #install npm
npm install -g typescript						          #install typescript
npm install -g @angular/cli						        #install cli
npm start										                  #start npm
ng -v											                    #check version
ng new ProjectName 								            #on project directory to create project
ng serve										                  #start project on 4200 port
ng build									  	                #build project
ng build --prod									              #build project ofusced
ng build --prod --aot                         #build project ofusced and minify
tsc FileName.js									              #create TypeScript in EcmaScript6
ng serve -port 4201 --live-reload-port 49153 	#configure default http port to live reload 
npm install bootstrap@next --save 				    #install bootstrap in project - ng2-bootstrap 
npm install materialize-css --save 				    #install materialize css in project
npm install angular2-materialize --save 		  #install materialize in project
npm install jquery@^2.2.4 --save 				      #install jquery in project
npm install lodash --save 						        #install lodash in project
npm install @types/lodash --save 				      #install bridge typescript and lodash in project
ng g c ComponentName							            #create component
ng g m ModuleName								              #create module with cli
ng g service NameFolder/ServiceName 			    #create service with cli
ng g directive DirectiveName 					        #create directive with cli
ng g pipe PipeName 								            #create pipe with cli
ng g class ClassName 						          	  #create class with cli
ng g interface InterfaceName 					        #create interface with cli
ng g enum EnumName 								            #create enum with cli
ng set defaults.styleExt scss					        #change project style with scss, less or styl
ng ling 										                  #lint code scan verify for good practicles and miss ';'
ng tests 										                  #execute test unit jasmine
ng e2e 											                  #execute test with protector

#--------------------------------------------------------------------------------------
#	C# CORE PACKAGES
#--------------------------------------------------------------------------------------
Install-Package Microsoft.EntityFrameworkCore -Version 1.1.2
Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 1.1.2
Install-Package RavenSharp.Core -Version 1.0.0-beta-1 -Pre

#FOR USE TOKEN
Install-Package Microsoft.IdentityModel.Tokens -Version 5.1.4
Install-Package System.IdentityModel.Tokens.Jwt -Version 5.1.4
Install-Package Microsoft.AspNetCore.ResponseCompression -Version 1.0.0
Install-Package Microsoft.AspNetCore.Authentication.JwtBearer -Version 1.1.0

#--------------------------------------------------------------------------------------
#	GIT
#--------------------------------------------------------------------------------------
git config --global --add merge.tool winmerge
git config --global --add mergetool.winmerge.path "C:/Program Files/WinMerge/WinMergeU.exe"
git config --global --add mergetool.winmerge.trustExitCode false

git config --global --add diff.guitool winmerge
git config --global --add difftool.winmerge.path "C:/Program Files/WinMerge/WinMergeU.exe"
git config --global --add difftool.winmerge.trustExitCode false

git remote add origin https://iwide.visualstudio.com/_git/intranet
git push -u origin --all

git reset --hard origin/master

git clone -b branch_name --single-branch https://iwide.visualstudio.com/_git/intranet

git fetch --tags                      #sync tags
git tag -d tagName                    #delete tag
git tag -a tagName -m "comment"       #create tag
git push origin --tags                #send tags

#--------------------------------------------------------------------------------------
#	ALGUNAR PACKAGES
#--------------------------------------------------------------------------------------
npm install --save @angular/animations
npm install --save @types/pickadate
npm install --save @angular/material
npm install --save animate.css
npm install --save font-awesome
npm install --save ng2-currency-mask  //https://github.com/cesarrew/ng2-currency-mask
npm install --save angular2-datepicker //https://github.com/akmittal/angular2-datepicker
npm install --save ng2-input-mask //https://github.com/lab123it/ng2-input-mask
npm install --save ng2-auto-complete //https://www.npmjs.com/package/ng2-auto-complete
npm install --save angular2-busy //https://github.com/devyumao/angular2-busy
npm install --savengx-bootstrap // https://github.com/valor-software/ngx-bootstrap
npm install --save text-mask-addons //https://github.com/text-mask/text-mask
npm install --save ng2-validation // https://github.com/yuyang041060120/ng2-validation
npm install --save pdfmake //https://github.com/bpampuch/pdfmake
npm install --save ngx-perfect-scrollbar //https://github.com/zefoy/ngx-perfect-scrollbar
npm install --save angular-2-data-table //https://github.com/ggmod/angular-2-data-table
npm install --save ngx-mydatepicker //https://github.com/kekeh/ngx-mydatepicker
npm install --save mydaterangepicker //https://github.com/kekeh/mydaterangepicker

#--------------------------------------------------------------------------------------
#	UPDATE ANGULAR CLI
#--------------------------------------------------------------------------------------
npm uninstall -g @angular/cli
npm uninstall --save-dev angular-cli
npm cache clean
npm install -g @angular/cli@latest
npm install --save-dev @angular/cli@latest

#--------------------------------------------------------------------------------------
#	UPDATE WEBPACK
#--------------------------------------------------------------------------------------
https://github.com/roshan3133/angular2-webpack-starter
npm remove webpack -g
npm uninstall --save-dev webpack
rm -rf node_modules
npm cache clean
npm install webpack --save-dev

#--------------------------------------------------------------------------------------
#	UPDATE TYPESCRIPT
#--------------------------------------------------------------------------------------
npm uninstall typescript -g
npm uninstall --save-dev typescript
npm install --save-dev typescript@next