angular 5 how to manage multiple projects? - structure

there are some projects in dev folder, UI - angular 5 apps:
dev folder
project1.UI folder
project1.Server folder
project2.UI folder
project2.server folder
At the begining was only project1:
project1 folder
src
app
shared
components
services
utils
package.json
Now need to create project2. Project2 should be separated, but it have some common stuff with project1 - some components, services, utils and also some packages from npm. How to achieve this?

Have a look at Nrwl Extensions for Angular by Viktor Savkin, Jeff Cross and few others (core members of Angular) which is a toolkit for enterprise angular apps. It provides good support for managing multiple Angular projects using mono repo.

Related

how can I install package to the wwwroot in mvc core 2

Recently I Installed the VS 2017 Which Contains Asp.net mvc core 2
but there is a very confusion problems there!
that is how can i Install a new package into the wwwroot so:
_ Im using bower but supporting is end of and can not find out bower.json in the project>> new item after config it using npm . I installed it using npm but still can not find( .bowerrc file under bower.json.) to set the directory:
So-called valid document
_with gulp and grunt : end of supporting gulp too and can not find gulpfile.js in the project>>new Item after configure it using npm
please heeeeeeeeeeeeeeeelp me
You can use Library Manager:
Library Manager (“LibMan” for short) is Visual Studio’s experimental
client-side library acquisition tool. It provides a lightweight,
simple mechanism that helps users find and fetch library files from an
external source (such as CDNJS) and place them in your project.

wwwroot/dist vs ClientApp/dist folder in .NETCore

What is the difference between "wwwroot/dist" and "ClientApp/dist" folders after running this command and how to use them correctly?
dotnet publish -c Release
The wwwroot/dist folder is basically an exposed folder that stores the compiled distributions of all pre-compiled javascript or scss code in the other parts of the project.
The ClientApp/dist folder stores all the compiled distributions of all the frontend framework classes/files within the ClientApp folder (i.e. AngularJS code transpiled docs).
.NET Core SPA apps usually route to the ClientApp/dist folder when performing Dependency injection on the SPA side of things.

What is the naming convention for ASP.NET Core projects?

In ASP.Net Core the convention for projects seems to be to put the ASP.Net Core projects inside a src\ folder, and the test projects inside a test\ folder.
What other conventions are there, ie. where should a web (front-end only) project be located?
The honest answer to this is "it depends." The src and test folders at the root are a common structure seen in code repositories today.
Here are some common root folders and what they may contain:
test - Unit tests, UI tests, Integration tests, etc.
src - Source code projects
tools - Strong-name files and/or 3rd party tools that may be used to help tests or builds
build - Scripts to perform various builds on the project
docs - Documentation files for the project
How would you organize a web (front-end only) project inside an ASP.NET Core directory structure?
The only advice I can give without knowing your project, and the people interacting with it, is to keep it simple. I haven't found a need to add more root folders beyond what's seen above.
Keep in mind that there are certain folders that a default project template is going to use:
By default, Grunt is set up to look in the css, js, and lib folders under wwwroot for its bundling process.
Bower (also with the default template) will install packages into the lib folder under wwwroot.
MVC looks through the Views folder for view templates.

Build solution with multiple projects

I have following project in one solution.
MVC Web Project
WPF Project
Library project common to both projects.
How can I build above projects & publish the output for MVC Web & WPF project to some directory using MSBuild command?
What you want is Maven. Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

ASP.NET MVC plugin architecture & deployments

For a customer we have an ASP.NET MVC plugin architecture consisting of:
- 1 core web application (this is the root web application in IIS)
- X plugins for which the content (views, css, scripts) are deployed in a sub folder (Areas)
The assemblies of the plugins are deployed in the root bin folder
The plugins are created by separate teams and these teams should be able to deploy a package to a server.
The package (ran by administrators) should make sure the plugin is deployed correctly (in a sub folder of the core) and the dll files should be deployed in the root bin.
I guess a deployment package should be created.
How can this be done or what are good practices around this?
How can I customize the way a package will be interpreted (MSBuild)?
Bit of a late answer, however I have been using a method of creating 'pluggable' areas similar to that discussed here and here.
What these articles talk about is a method to turn areas into separate web projects which can then be bin deployed with the original web app when required.
I have extended their methods with a custom ViewEngine which inherits from the Razor view engine, to look for Views in a specified folder location (I named this folder 'Modules'). This is dynamic based upon whether the modules are included or not (I search for modules in the Modules folder on app_start).
Hope this helps!