You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The boilerplate using multiple projects in one Angular environment so that the boilerplate help users
11
-
to improve code reusability,maintainability and customization. boilerplate can also help in increase productivity, reduce risks, and improve the quality of application.
12
-
The multiple applications or parts of applications that share common functionality, using multiple
13
-
projects can help you avoid duplicating code. You can create a shared library project and use it across all the projects. This approach can help you maintain consistency and reduce code duplication.
14
-
9
+
This boilerplate uses multiple projects in single Angular workspace, which helps the users to develop shareable libraries, and for enterprises to use a "monorepo" development style, with a single repository and global configuration for all Angular projects. This boilerplate can also help in increasing productivity, reduce risks, and improve the quality of application.Duplication and redundant code can be avoided by using boilerplate approach.
15
10
16
11
## Usage
17
12
18
-
####Step 1: Clone the boilerplate project repository to your local machine
13
+
### Step 1: Clone the boilerplate project repository to your local machine
####Step 2: Install the project dependencies by running the following command
19
+
### Step 2: Install the project dependencies by running the following command
25
20
26
21
```sh
27
22
npm install
28
23
```
29
24
30
-
After this, it will take a few minutes to set everything up, once that is done, you will see a folder structure generated like below:
25
+
After this, it will take a few minutes to set everything up, once that is done, you will see a folder structure generated like the following:-
31
26
32
27
```
33
28
BOILER-PLATE
@@ -45,19 +40,20 @@ BOILER-PLATE
45
40
├── README.md
46
41
└── tsconfig.json
47
42
```
48
-
As can be seen above, scaffold has initialized and set up a lot, such as:
43
+
Some predefined settings are initialised:-
49
44
50
-
1. GitHub PR template inside `.github`
51
-
2. Conventional commits enablement using commitizen (`.cz-config.js`), commitlint (`commitlint-config.js`)
45
+
1.A GitHub PR template is created inside:`.github`
46
+
2. Conventional commits are enabled using commitizen (`.cz-config.js`), commitlint (`commitlint-config.js`)
52
47
and husky for githooks.
53
48
3.`.gitignore` for ignoring files from source code. Important for secure coding and keeping the repo clean
54
49
on SCM (git)
55
50
4.`package.json` and `package-lock.json` for npm to work.
56
51
5. The folder named `projects`: Projects will hold the multi application pattern and will always be
57
-
completely independent
52
+
completely independent.
58
53
59
-
#### The Structure is main project folder
54
+
#### Projects
60
55
56
+
##### Structure
61
57
```
62
58
PROJECTS
63
59
├── arc
@@ -70,38 +66,45 @@ PROJECTS
70
66
│ └── theme
71
67
├── (...other files)
72
68
```
73
-
74
-
## Projects
75
-
76
-
### Purpose of the Projects folder boilerplate have
77
-
- Boilerplate use Multi project to avoid duplicate code and easy maintainance this can be used where
78
-
we have to maintain multiple projects that have something in common like a user portal and admin portal
79
-
Here Boilerplate use "Projects" folder typically serves as a centralized location to organize and store project-related files and resources.
80
-
- Boilerplate allows users to Generate new applications at same workspace with following command:
81
-
69
+
##### Purpose
70
+
- As stated above, the boilerplate uses Multi-projects pattern to avoid duplication and is easy to maintain.
71
+
Here Boilerplate use "Projects" folder, which serves as a centralized location to organize and store project-related files and resources. For example:- An application can have multiple user portal :- admin-portal and super-admin-portal. In that case, the structure of the "Projects" folder can look like the following:-
72
+
```
73
+
PROJECTS
74
+
├── admin-portal
75
+
├── super-admin-portal
76
+
├── shared-lib
77
+
│ └── src
78
+
│ └──lib
79
+
│ ├── assets
80
+
│ ├── components
81
+
│ ├── core
82
+
│ └── theme
83
+
├── (...other files)
84
+
```
85
+
86
+
- Boilerplate allows users to Generate new applications at same workspace by using the following command:
82
87
```sh
83
88
ng generate application <application-name>
84
89
```
85
90
86
-
1. Arc:
87
-
- This boilerplate arc project is a project set up that can be easily altered to create new projects.
88
-
The user is able to use in the original project, its foundation, and its structure to set up a new one without changing the original.
91
+
1. Arc:
92
+
- This refers to the different applications inside single workspace sharing code.
89
93
90
-
2. Arc-Lib
91
-
- A arc-lib shared library can include components, services, pipes, directives, and other modules that can be used by other projects in the workspace. By using a shared library, we avoid duplicating code and functionality across multiple projects, which can save time and effort.
94
+
2. Arc-Lib
95
+
- This refers to the shared library which can include components, services, pipes, directives, and other modules that are shared among the applications in the workspace. By using a shared library, we avoid duplicating and using redundant code across, which can save time and effort.
92
96
93
97
For further reference you can refer [Here](projects/arc-lib/README.md)
94
98
99
+
### Step 3: Setup the application to run
95
100
96
-
#### Step 3: Setup of Starting the Server
97
-
98
-
- By Default boilerplate giving `defaultProject` as `arc` in the `angular.json` you can do further changes as per your Project requirment so that if you directly do `ng serve` your project run by default.
101
+
- By default, boilerplate refers to `arc` as a `defaultProject` in the `angular.json`. One can modify it according to the project requirements.
99
102
100
103
```typescript
101
104
"defaultProject": "arc",
102
105
```
103
106
104
-
####Step 4: Running Server
107
+
### Step 4: Running Server
105
108
106
109
```sh
107
110
ng serve
@@ -111,11 +114,12 @@ You'll see a message saying Server is running at `http://localhost:4200/` Naviga
111
114
112
115
## Build the Application
113
116
114
-
To build the project. The build artifacts will be stored in the `dist/` directory.
115
-
117
+
To build the project, run the following command:-
118
+
116
119
```sh
117
120
ng build
118
121
```
122
+
The build artifacts will be stored in the `dist/` directory.
119
123
120
124
## Running unit tests
121
125
@@ -128,3 +132,6 @@ Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To u
128
132
## Further help
129
133
130
134
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
0 commit comments