From b47df0f103a873e400ec73baee150d34ff6c97d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 15 Aug 2018 13:41:55 -0400 Subject: [PATCH] add templating of app URL --- gulpfile.babel.js | 8 ++++++++ src/html/index.html | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gulpfile.babel.js b/gulpfile.babel.js index e689239..a929aa7 100755 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -16,8 +16,15 @@ import gutil from 'gulp-util' import rename from 'gulp-rename' import uglify from 'gulp-uglify' import htmlmin from 'gulp-htmlmin' +import template from 'gulp-template' import imagemin from 'gulp-imagemin' +/* HTML template parameters */ +const apk_url = ( + process.env.NODE_ENV || + 'http://artifacts.status.im:8081/artifactory/nightlies-local/im.status.ethereum-14a369-rel.apk' +) + gulp.task('js', () => { return gulp.src('src/js/**/*.js', {read: false}) .pipe(sourcemaps.init({loadMaps: true})) @@ -40,6 +47,7 @@ gulp.task('fonts', () => { gulp.task('html', () => { return gulp.src(['src/**/*.html']) .pipe(htmlmin({collapseWhitespace: true, minifyJS: true})) + .pipe(template({apk_url})) .pipe(rename(p => p.dirname = p.dirname.slice(5))) .pipe(gulp.dest('dist')) }) diff --git a/src/html/index.html b/src/html/index.html index c67968b..3470af0 100644 --- a/src/html/index.html +++ b/src/html/index.html @@ -63,7 +63,7 @@
Status是一个浏览器、通讯工具和通向去中心化世界的入口。