Skip to content

Commit ba14613

Browse files
author
Li Wei
committed
改成 pnpm
1 parent 529e65d commit ba14613

File tree

6 files changed

+25955
-15421
lines changed

6 files changed

+25955
-15421
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@
3333

3434
## 启动及运行
3535

36-
首先通过命令行进入本项目根目录,通过 `npm` 安装依赖:
36+
本项目使用 `pnpm` 安装包和管理项目。
37+
38+
首先通过命令行进入本项目根目录,通过 `pnpm` 安装依赖:
3739

3840
```bash
39-
$> npm install
41+
$> pnpm install -g @angular/cli
42+
$> pnpm install
4043
$> cd app
41-
$> npm install
44+
$> pnpm install
4245
```
4346

4447
开发模式运行:

angular.json

Lines changed: 159 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -1,170 +1,171 @@
11
{
2-
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3-
"cli": {
4-
"defaultCollection": "@angular-eslint/schematics"
5-
},
6-
"version": 1,
7-
"newProjectRoot": "projects",
8-
"projects": {
9-
"branchie": {
10-
"root": "",
11-
"sourceRoot": "src",
12-
"projectType": "application",
13-
"schematics": {
14-
"@schematics/angular:application": {
15-
"strict": true
16-
}
17-
},
18-
"architect": {
19-
"build": {
20-
"builder": "@angular-builders/custom-webpack:browser",
21-
"options": {
22-
"outputPath": "dist",
23-
"index": "src/index.html",
24-
"main": "src/main.ts",
25-
"tsConfig": "src/tsconfig.app.json",
26-
"polyfills": "src/polyfills.ts",
27-
"assets": [
28-
"src/favicon.ico",
29-
"src/assets"
30-
],
31-
"styles": [
32-
"src/styles.scss"
33-
],
34-
"scripts": [],
35-
"customWebpackConfig": {
36-
"path": "./angular.webpack.js",
37-
"replaceDuplicatePlugins": true
38-
}
39-
},
40-
"configurations": {
41-
"dev": {
42-
"optimization": false,
43-
"outputHashing": "none",
44-
"sourceMap": true,
45-
"namedChunks": false,
46-
"aot": false,
47-
"extractLicenses": true,
48-
"vendorChunk": false,
49-
"buildOptimizer": false,
50-
"fileReplacements": [
51-
{
52-
"replace": "src/environments/environment.ts",
53-
"with": "src/environments/environment.dev.ts"
54-
}
55-
]
56-
},
57-
"web": {
58-
"optimization": false,
59-
"outputHashing": "none",
60-
"sourceMap": true,
61-
"namedChunks": false,
62-
"aot": false,
63-
"extractLicenses": true,
64-
"vendorChunk": false,
65-
"buildOptimizer": false,
66-
"fileReplacements": [
67-
{
68-
"replace": "src/environments/environment.ts",
69-
"with": "src/environments/environment.web.ts"
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"cli": {
4+
"defaultCollection": "@angular-eslint/schematics"
5+
},
6+
"version": 1,
7+
"newProjectRoot": "projects",
8+
"projects": {
9+
"branchie": {
10+
"root": "",
11+
"sourceRoot": "src",
12+
"projectType": "application",
13+
"schematics": {
14+
"@schematics/angular:application": {
15+
"strict": true
7016
}
71-
]
7217
},
73-
"production": {
74-
"optimization": true,
75-
"outputHashing": "all",
76-
"sourceMap": false,
77-
"namedChunks": false,
78-
"aot": true,
79-
"extractLicenses": true,
80-
"vendorChunk": false,
81-
"buildOptimizer": true,
82-
"fileReplacements": [
83-
{
84-
"replace": "src/environments/environment.ts",
85-
"with": "src/environments/environment.prod.ts"
18+
"architect": {
19+
"build": {
20+
"builder": "@angular-builders/custom-webpack:browser",
21+
"options": {
22+
"outputPath": "dist",
23+
"baseHref": "./",
24+
"index": "src/index.html",
25+
"main": "src/main.ts",
26+
"tsConfig": "src/tsconfig.app.json",
27+
"polyfills": "src/polyfills.ts",
28+
"assets": [
29+
"src/favicon.ico",
30+
"src/assets"
31+
],
32+
"styles": [
33+
"src/styles.scss"
34+
],
35+
"scripts": [],
36+
"customWebpackConfig": {
37+
"path": "./angular.webpack.js",
38+
"replaceDuplicatePlugins": true
39+
}
40+
},
41+
"configurations": {
42+
"dev": {
43+
"optimization": false,
44+
"outputHashing": "none",
45+
"sourceMap": true,
46+
"namedChunks": false,
47+
"aot": false,
48+
"extractLicenses": true,
49+
"vendorChunk": false,
50+
"buildOptimizer": false,
51+
"fileReplacements": [
52+
{
53+
"replace": "src/environments/environment.ts",
54+
"with": "src/environments/environment.dev.ts"
55+
}
56+
]
57+
},
58+
"web": {
59+
"optimization": false,
60+
"outputHashing": "none",
61+
"sourceMap": true,
62+
"namedChunks": false,
63+
"aot": false,
64+
"extractLicenses": true,
65+
"vendorChunk": false,
66+
"buildOptimizer": false,
67+
"fileReplacements": [
68+
{
69+
"replace": "src/environments/environment.ts",
70+
"with": "src/environments/environment.web.ts"
71+
}
72+
]
73+
},
74+
"production": {
75+
"optimization": true,
76+
"outputHashing": "all",
77+
"sourceMap": false,
78+
"namedChunks": false,
79+
"aot": true,
80+
"extractLicenses": true,
81+
"vendorChunk": false,
82+
"buildOptimizer": true,
83+
"fileReplacements": [
84+
{
85+
"replace": "src/environments/environment.ts",
86+
"with": "src/environments/environment.prod.ts"
87+
}
88+
]
89+
}
90+
}
91+
},
92+
"serve": {
93+
"builder": "@angular-builders/custom-webpack:dev-server",
94+
"options": {
95+
"browserTarget": "branchie:build"
96+
},
97+
"configurations": {
98+
"dev": {
99+
"browserTarget": "branchie:build:dev"
100+
},
101+
"web": {
102+
"browserTarget": "branchie:build:web"
103+
},
104+
"production": {
105+
"browserTarget": "branchie:build:production"
106+
}
107+
}
108+
},
109+
"extract-i18n": {
110+
"builder": "@angular-devkit/build-angular:extract-i18n",
111+
"options": {
112+
"browserTarget": "branchie:build"
113+
}
114+
},
115+
"test": {
116+
"builder": "@angular-builders/custom-webpack:karma",
117+
"options": {
118+
"main": "src/test.ts",
119+
"polyfills": "src/polyfills-test.ts",
120+
"tsConfig": "src/tsconfig.spec.json",
121+
"karmaConfig": "src/karma.conf.js",
122+
"scripts": [],
123+
"styles": [
124+
"src/styles.scss"
125+
],
126+
"assets": [
127+
"src/assets"
128+
],
129+
"customWebpackConfig": {
130+
"path": "./angular.webpack.js",
131+
"replaceDuplicatePlugins": true
132+
}
133+
}
134+
},
135+
"lint": {
136+
"builder": "@angular-eslint/builder:lint",
137+
"options": {
138+
"lintFilePatterns": [
139+
"src/**/*.ts",
140+
"src/**/*.html"
141+
]
142+
}
86143
}
87-
]
88144
}
89-
}
90145
},
91-
"serve": {
92-
"builder": "@angular-builders/custom-webpack:dev-server",
93-
"options": {
94-
"browserTarget": "branchie:build"
95-
},
96-
"configurations": {
97-
"dev": {
98-
"browserTarget": "branchie:build:dev"
99-
},
100-
"web": {
101-
"browserTarget": "branchie:build:web"
102-
},
103-
"production": {
104-
"browserTarget": "branchie:build:production"
105-
}
106-
}
107-
},
108-
"extract-i18n": {
109-
"builder": "@angular-devkit/build-angular:extract-i18n",
110-
"options": {
111-
"browserTarget": "branchie:build"
112-
}
113-
},
114-
"test": {
115-
"builder": "@angular-builders/custom-webpack:karma",
116-
"options": {
117-
"main": "src/test.ts",
118-
"polyfills": "src/polyfills-test.ts",
119-
"tsConfig": "src/tsconfig.spec.json",
120-
"karmaConfig": "src/karma.conf.js",
121-
"scripts": [],
122-
"styles": [
123-
"src/styles.scss"
124-
],
125-
"assets": [
126-
"src/assets"
127-
],
128-
"customWebpackConfig": {
129-
"path": "./angular.webpack.js",
130-
"replaceDuplicatePlugins": true
146+
"branchie-e2e": {
147+
"root": "e2e",
148+
"projectType": "application",
149+
"architect": {
150+
"lint": {
151+
"builder": "@angular-eslint/builder:lint",
152+
"options": {
153+
"lintFilePatterns": [
154+
"e2e/**/*.ts"
155+
]
156+
}
157+
}
131158
}
132-
}
133-
},
134-
"lint": {
135-
"builder": "@angular-eslint/builder:lint",
136-
"options": {
137-
"lintFilePatterns": [
138-
"src/**/*.ts",
139-
"src/**/*.html"
140-
]
141-
}
142159
}
143-
}
144160
},
145-
"branchie-e2e": {
146-
"root": "e2e",
147-
"projectType": "application",
148-
"architect": {
149-
"lint": {
150-
"builder": "@angular-eslint/builder:lint",
151-
"options": {
152-
"lintFilePatterns": [
153-
"e2e/**/*.ts"
154-
]
155-
}
161+
"defaultProject": "branchie",
162+
"schematics": {
163+
"@schematics/angular:component": {
164+
"prefix": "app",
165+
"style": "scss"
166+
},
167+
"@schematics/angular:directive": {
168+
"prefix": "app"
156169
}
157-
}
158-
}
159-
},
160-
"defaultProject": "branchie",
161-
"schematics": {
162-
"@schematics/angular:component": {
163-
"prefix": "app",
164-
"style": "scss"
165-
},
166-
"@schematics/angular:directive": {
167-
"prefix": "app"
168170
}
169-
}
170171
}

0 commit comments

Comments
 (0)