diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-07-03 06:56:51 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-07-03 06:56:51 +0800 |
commit | 42feca1f27d5bf441cc29f46bf8ea7bd0f8aee37 (patch) | |
tree | 885a5b1df04e510061308aeafbcb9d19a8acfaf9 /development | |
parent | ffaca7971ad6251a5b4d62fa88a77bc0414ddf77 (diff) | |
download | tangerine-wallet-browser-42feca1f27d5bf441cc29f46bf8ea7bd0f8aee37.tar tangerine-wallet-browser-42feca1f27d5bf441cc29f46bf8ea7bd0f8aee37.tar.gz tangerine-wallet-browser-42feca1f27d5bf441cc29f46bf8ea7bd0f8aee37.tar.bz2 tangerine-wallet-browser-42feca1f27d5bf441cc29f46bf8ea7bd0f8aee37.tar.lz tangerine-wallet-browser-42feca1f27d5bf441cc29f46bf8ea7bd0f8aee37.tar.xz tangerine-wallet-browser-42feca1f27d5bf441cc29f46bf8ea7bd0f8aee37.tar.zst tangerine-wallet-browser-42feca1f27d5bf441cc29f46bf8ea7bd0f8aee37.zip |
fix sourcemap-validator.js warnings
Diffstat (limited to 'development')
-rw-r--r-- | development/sourcemap-validator.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/development/sourcemap-validator.js b/development/sourcemap-validator.js index a85547058..143888128 100644 --- a/development/sourcemap-validator.js +++ b/development/sourcemap-validator.js @@ -1,6 +1,6 @@ const fs = require('fs') const { SourceMapConsumer } = require('source-map') - +const path = require('path') // // Utility to help check if sourcemaps are working // @@ -11,9 +11,11 @@ const { SourceMapConsumer } = require('source-map') start() + async function start () { - const rawBuild = fs.readFileSync(__dirname + '/../dist/chrome/inpage.js', 'utf8') - const rawSourceMap = fs.readFileSync(__dirname + '/../dist/sourcemaps/inpage.js.map', 'utf8') + const rawBuild = fs.readFileSync(path.join(__dirname, '/../dist/chrome/', 'inpage.js') + , 'utf8') + const rawSourceMap = fs.readFileSync(path.join(__dirname, '/../dist/sourcemaps/', 'inpage.js.map'), 'utf8') const consumer = await new SourceMapConsumer(rawSourceMap) console.log('hasContentsOfAllSources:', consumer.hasContentsOfAllSources(), '\n') @@ -43,7 +45,8 @@ async function start () { } function indicesOf (substring, string) { - var a = [], i = -1 + var a = [] + var i = -1 while ((i = string.indexOf(substring, i + 1)) >= 0) a.push(i) return a } |