Skip to content

Commit f93b679

Browse files
committed
add deployment script for netlify and render
1 parent 0d9cbcf commit f93b679

4 files changed

Lines changed: 54 additions & 0 deletions

File tree

angular.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,44 @@
6161
}
6262
]
6363
},
64+
"netlify": {
65+
"budgets": [
66+
{
67+
"type": "anyComponentStyle",
68+
"maximumWarning": "6kb"
69+
}
70+
],
71+
"optimization": true,
72+
"outputHashing": "all",
73+
"sourceMap": false,
74+
"namedChunks": false,
75+
"extractLicenses": true,
76+
"fileReplacements": [
77+
{
78+
"replace": "src/environments/environment.ts",
79+
"with": "src/environments/environment.netlify.ts"
80+
}
81+
]
82+
},
83+
"render": {
84+
"budgets": [
85+
{
86+
"type": "anyComponentStyle",
87+
"maximumWarning": "6kb"
88+
}
89+
],
90+
"optimization": true,
91+
"outputHashing": "all",
92+
"sourceMap": false,
93+
"namedChunks": false,
94+
"extractLicenses": true,
95+
"fileReplacements": [
96+
{
97+
"replace": "src/environments/environment.ts",
98+
"with": "src/environments/environment.render.ts"
99+
}
100+
]
101+
},
64102
"nas": {
65103
"budgets": [
66104
{
@@ -112,6 +150,12 @@
112150
"azure": {
113151
"buildTarget": "text-compare-angular:build:azure"
114152
},
153+
"netlify": {
154+
"buildTarget": "text-compare-angular:build:netlify"
155+
},
156+
"render": {
157+
"buildTarget": "text-compare-angular:build:render"
158+
},
115159
"nas": {
116160
"buildTarget": "text-compare-angular:build:nas"
117161
},

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"start:mock": "node server.js",
1414
"build": "ng build --configuration production",
1515
"build:azure": "ng build --configuration azure",
16+
"build:netlify": "ng build --configuration netlify",
17+
"build:render": "ng build --configuration render",
1618
"build:nas": "ng build --configuration nas",
1719
"build:cross:env": "rimraf dist compiled && cross-env SOURCE_MAP=0 ng build --configuration production",
1820
"test": "ng test",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const environment = {
2+
production: true,
3+
env_name: 'Netlify'
4+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const environment = {
2+
production: true,
3+
env_name: 'Render'
4+
};

0 commit comments

Comments
 (0)