Skip to content

Commit d978bbc

Browse files
authored
Merge pull request #9 from k-shirahama/staging
Release to Master
2 parents 9015506 + 4f4a7d0 commit d978bbc

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

angular.json

+17
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@
3636
"scripts": []
3737
},
3838
"configurations": {
39+
"staging": {
40+
"fileReplacements": [
41+
{
42+
"replace": "src/environments/environment.ts",
43+
"with": "src/environments/environment.staging.ts"
44+
}
45+
],
46+
"budgets": [
47+
{
48+
"type": "anyComponentStyle",
49+
"maximumWarning": "6kb"
50+
}
51+
]
52+
},
3953
"production": {
4054
"fileReplacements": [
4155
{
@@ -71,6 +85,9 @@
7185
"browserTarget": "angular-material-a11y-sample:build"
7286
},
7387
"configurations": {
88+
"staging": {
89+
"browserTarget": "angular-material-a11y-sample:build:staging"
90+
},
7491
"production": {
7592
"browserTarget": "angular-material-a11y-sample:build:production"
7693
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"scripts": {
4040
"ng": "ng",
4141
"start": "ng serve",
42-
"deploy": "npm run lint && npm run build -- -c $ENVIRONMENT_PARAM",
42+
"deploy": "if [ $VERCEL_GIT_COMMIT_REF = master ]; then env=production; elif [ $VERCEL_GIT_COMMIT_REF = staging ]; then env=staging; fi && npm run build -- -c=$env",
4343
"build": "ng build",
4444
"test": "ng test",
4545
"lint": "ng lint",
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// This file can be replaced during build by using the `fileReplacements` array.
2+
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3+
// The list of file replacements can be found in `angular.json`.
4+
5+
export const environment = {
6+
production: false,
7+
test: 'ステージング環境',
8+
};
9+
10+
/*
11+
* For easier debugging in development mode, you can import the following file
12+
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
13+
*
14+
* This import should be commented out in production mode because it will have a negative impact
15+
* on performance if an error is thrown.
16+
*/
17+
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.

0 commit comments

Comments
 (0)