forked from tqheel/rplcr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
30 lines (25 loc) · 816 Bytes
/
gulpfile.js
File metadata and controls
30 lines (25 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var gulp = require('gulp');
var batchReplace = require('gulp-batch-replace');
gulp.task('default', function() {
console.log('Rewriting project URLs for staging...');
var urlsSwaps = [
['http://localhost', 'https://staging.kewlhost.com'],
["baseRealtimeUrl = 'https://staging", "baseRealtimeUrl = 'https://adestaging"]
];
gulp.src(['./dev/urlFile.js'])
.pipe(batchReplace(urlsSwaps))
.pipe(gulp.dest('./stage/'));
var hosts = {
dev: 'development_server_name',
stage: 'stage_server_name',
prod: 'prod_server_name'
};
console.log('Rewriting project connection strings for staging...');
var connHostFrag = 'Data Source=';
var connSwaps = [
[connHostFrag+hosts.dev, connHostFrag+hosts.stage]
];
gulp.src(['./dev/conn.txt'])
.pipe(batchReplace(connSwaps))
.pipe(gulp.dest('./stage/'));
});