Steps to install the Materio .Net Core MVC on your system🧑💻
LTS
and jump to step 2.npm install --global yarn
npm install --global gulp-cli
AspnetCoreMvcFull
or AspnetCoreMvcStarter
folder in VS Code.AspnetCoreMvcFull
or AspnetCoreMvcStarter
and run following command to install our local dependencies listed in package.json
. npm
OR yarn
as per your preference.# For Yarn
yarn
# For npm
npm install --legacy-peer-deps
Reason for using npm install -legacy-peer-deps
: In the new version of npm (v7), by default, npm install
will fail when it encounters conflicting peerDependencies. Read more
The above command will install all the required Node.js modules into the node_modules/
directory inside your app folder. While installing this command you may see few warnings, don't worry about that for more details refer to our FAQ npm/yarn install warnings.
yarn build
Find more about assets compilation here
dotnet watch
That will make your application to run in the browser automatically. Also, Restarts or hot reloads the specified application when changes in the source code are detected.
Also, find more about watch command here
For Visual Studio
package.json
and select Restore Packages
. Wait while packages restored.View > Other Windows > Task Runner Explorer
build
task to compile assets.Debug > Start Debugging
Open command prompt/terminal, go to the Materio root directory and run yarn {task_name}
.
For example, To generate compile assets, run yarn build
.
Development Tasks (Yarn/Gulp)
Task (yarn
or gulp
) lists for development.
Yarn Task | Gulp Task | Description |
---|---|---|
yarn watch |
gulp watch |
Watch files for changes and automatically recompile them when it changed. |
yarn build |
gulp build |
Compile sources and copy assets. |
yarn build:css |
gulp build:css |
Compile SCSS sources and generate CSS. |
yarn build:js |
gulp build:js |
Transpile & Compile JS sources using Webpack. |
Production tasks (Yarn/Gulp)
Task (yarn
or gulp
) lists for production.
Yarn Task | Gulp Task | Description |
---|---|---|
yarn build:prod |
gulp build --env=production |
Run build task in production environment. |
yarn build:prod:css |
gulp build:css --env=production |
Run build:css task in production environment. |
yarn build:prod:js |
gulp build:js --env=production |
Run build:js task in production environment. |
.Net Commands
.Net command to run and watch the application. Find other commands from microsoft here.
.NET Task | Description |
---|---|
dotnet run |
Run the application. |
dotnet watch |
Watch files for changes and automatically recompile them when it changed. |
dotnet build |
Builds a project and all of its dependencies. |
dotnet publish |
Publishes the application and its dependencies to a folder for deployment to a hosting system. |
For .Net Core hosting and deployment documentation, please refer this