diff options
author | kumavis <kumavis@users.noreply.github.com> | 2016-10-13 04:03:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-13 04:03:15 +0800 |
commit | 88a68f732ee068d5f230708927207e3f84c43ad0 (patch) | |
tree | 5d0b967a582a7ef6e189834fccba5ede7e73101e /gulpfile.js | |
parent | a1c3c944cf534fff8bfb9560347a03ba2a2bda00 (diff) | |
parent | d67a5031c7f2b4cd14d3d27f3769a31769012f54 (diff) | |
download | tangerine-wallet-browser-88a68f732ee068d5f230708927207e3f84c43ad0.tar tangerine-wallet-browser-88a68f732ee068d5f230708927207e3f84c43ad0.tar.gz tangerine-wallet-browser-88a68f732ee068d5f230708927207e3f84c43ad0.tar.bz2 tangerine-wallet-browser-88a68f732ee068d5f230708927207e3f84c43ad0.tar.lz tangerine-wallet-browser-88a68f732ee068d5f230708927207e3f84c43ad0.tar.xz tangerine-wallet-browser-88a68f732ee068d5f230708927207e3f84c43ad0.tar.zst tangerine-wallet-browser-88a68f732ee068d5f230708927207e3f84c43ad0.zip |
Merge branch 'master' into i695-dapp-reload
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js index 9f1acbf67..26ad0c1f8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -18,8 +18,15 @@ var path = require('path') var manifest = require('./app/manifest.json') var gulpif = require('gulp-if') var replace = require('gulp-replace') +var disclaimer = fs.readFileSync(path.join(__dirname, 'USER_AGREEMENT.md')).toString() +var crypto = require('crypto') +var hash = crypto.createHash('sha256') + +hash.update(disclaimer) +var tosHash = hash.digest('hex') var disableLiveReload = gutil.env.disableLiveReload +var debug = gutil.env.debug // browser reload @@ -237,6 +244,8 @@ function bundleTask(opts) { .on('error', gutil.log.bind(gutil, 'Browserify Error')) .pipe(source(opts.filename)) .pipe(brfs()) + .pipe(replace('GULP_TOS_HASH', tosHash)) + .pipe(replace('\'GULP_METAMASK_DEBUG\'', debug)) // optional, remove if you don't need to buffer file contents .pipe(buffer()) // optional, remove if you dont want sourcemaps |