mirror of
https://github.com/bitwarden/web
synced 2025-12-15 07:43:16 +00:00
rework configs to accomedate preview env
This commit is contained in:
13
gulpfile.js
13
gulpfile.js
@@ -214,9 +214,9 @@ function config() {
|
|||||||
constants: _.merge({}, {
|
constants: _.merge({}, {
|
||||||
appSettings: {
|
appSettings: {
|
||||||
version: project.version,
|
version: project.version,
|
||||||
environment: project.production ? 'Production' : 'Development'
|
environment: project.env
|
||||||
}
|
}
|
||||||
}, require('./settings' + (project.production ? '.Production' : '') + '.json') || {})
|
}, require('./settings.' + project.env + '.json') || {})
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,6 +377,15 @@ gulp.task('deploy', ['dist'], function () {
|
|||||||
.pipe(ghPages({ cacheDir: paths.dist + '.publish' }));
|
.pipe(ghPages({ cacheDir: paths.dist + '.publish' }));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task('deploy-preview', ['dist'], function () {
|
||||||
|
return gulp.src(paths.dist + '**/*')
|
||||||
|
.pipe(ghPages({
|
||||||
|
cacheDir: paths.dist + '.publish',
|
||||||
|
remoteUrl: 'git@github.com:bitwarden/web-preview.git',
|
||||||
|
origin: 'preview'
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
gulp.task('serve', function () {
|
gulp.task('serve', function () {
|
||||||
connect.server({
|
connect.server({
|
||||||
port: 4001,
|
port: 4001,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "bitwarden",
|
"name": "bitwarden",
|
||||||
"version": "1.9.1",
|
"version": "1.10.0",
|
||||||
"production": true,
|
"env": "Production",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"connect": "3.6.0",
|
"connect": "3.6.0",
|
||||||
"lodash": "4.17.4",
|
"lodash": "4.17.4",
|
||||||
|
|||||||
5
settings.Preview.json
Normal file
5
settings.Preview.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"appSettings": {
|
||||||
|
"apiUri": "https://preview.api.bitwarden.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
angular.module("bit")
|
angular.module("bit")
|
||||||
.constant("appSettings", {"apiUri":"https://api.bitwarden.com","version":"1.9.1","environment":"Production"});
|
.constant("appSettings", {"apiUri":"https://api.bitwarden.com","version":"1.10.0","environment":"Production"});
|
||||||
|
|||||||
Reference in New Issue
Block a user