aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2018-03-29 12:29:57 +0800
committerkumavis <aaron@kumavis.me>2018-03-29 12:29:57 +0800
commit253abd60fca5a6efb1a2e0ecbe305989a852ec32 (patch)
tree179773e462f77175a85d647e595f3f0f20e86abc
parentb88119c23851144448771e8a6de97e48fb96b2b0 (diff)
downloadtangerine-wallet-browser-253abd60fca5a6efb1a2e0ecbe305989a852ec32.tar
tangerine-wallet-browser-253abd60fca5a6efb1a2e0ecbe305989a852ec32.tar.gz
tangerine-wallet-browser-253abd60fca5a6efb1a2e0ecbe305989a852ec32.tar.bz2
tangerine-wallet-browser-253abd60fca5a6efb1a2e0ecbe305989a852ec32.tar.lz
tangerine-wallet-browser-253abd60fca5a6efb1a2e0ecbe305989a852ec32.tar.xz
tangerine-wallet-browser-253abd60fca5a6efb1a2e0ecbe305989a852ec32.tar.zst
tangerine-wallet-browser-253abd60fca5a6efb1a2e0ecbe305989a852ec32.zip
build - extension - move js files to toplevel
-rw-r--r--app/home.html2
-rw-r--r--app/manifest.json10
-rw-r--r--app/notification.html2
-rw-r--r--app/popup.html2
-rw-r--r--app/scripts/contentscript.js6
-rw-r--r--gulpfile.js6
6 files changed, 14 insertions, 14 deletions
diff --git a/app/home.html b/app/home.html
index bb8e936a3..4fad0f993 100644
--- a/app/home.html
+++ b/app/home.html
@@ -7,6 +7,6 @@
</head>
<body>
<div id="app-content"></div>
- <script src="./scripts/ui.js" type="text/javascript" charset="utf-8"></script>
+ <script src="./ui.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>
diff --git a/app/manifest.json b/app/manifest.json
index a20f9b976..1982b4820 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -27,8 +27,8 @@
"default_locale": "en",
"background": {
"scripts": [
- "scripts/chromereload.js",
- "scripts/background.js"
+ "chromereload.js",
+ "background.js"
],
"persistent": true
},
@@ -48,7 +48,7 @@
"https://*/*"
],
"js": [
- "scripts/contentscript.js"
+ "contentscript.js"
],
"run_at": "document_start",
"all_frames": true
@@ -62,11 +62,11 @@
"https://*.infura.io/"
],
"web_accessible_resources": [
- "scripts/inpage.js"
+ "inpage.js"
],
"externally_connectable": {
"matches": [
"https://metamask.io/*"
]
}
-} \ No newline at end of file
+}
diff --git a/app/notification.html b/app/notification.html
index 2255ca2c1..457ba7137 100644
--- a/app/notification.html
+++ b/app/notification.html
@@ -11,6 +11,6 @@
</head>
<body class="notification" style="height:600px;">
<div id="app-content"></div>
- <script src="./scripts/ui.js" type="text/javascript" charset="utf-8"></script>
+ <script src="./ui.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>
diff --git a/app/popup.html b/app/popup.html
index 109487d3e..3acfd8c55 100644
--- a/app/popup.html
+++ b/app/popup.html
@@ -7,6 +7,6 @@
</head>
<body style="width:357px; height:600px;">
<div id="app-content"></div>
- <script src="./scripts/ui.js" type="text/javascript" charset="utf-8"></script>
+ <script src="./ui.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js
index 7abbc60e7..2098fae27 100644
--- a/app/scripts/contentscript.js
+++ b/app/scripts/contentscript.js
@@ -7,8 +7,8 @@ const ObjectMultiplex = require('obj-multiplex')
const extension = require('extensionizer')
const PortStream = require('./lib/port-stream.js')
-const inpageContent = fs.readFileSync(path.join(__dirname, '..', '..', 'dist', 'chrome', 'scripts', 'inpage.js')).toString()
-const inpageSuffix = '//# sourceURL=' + extension.extension.getURL('scripts/inpage.js') + '\n'
+const inpageContent = fs.readFileSync(path.join(__dirname, '..', '..', 'dist', 'chrome', 'inpage.js')).toString()
+const inpageSuffix = '//# sourceURL=' + extension.extension.getURL('inpage.js') + '\n'
const inpageBundle = inpageContent + inpageSuffix
// Eventually this streaming injection could be replaced with:
@@ -96,7 +96,7 @@ function logStreamDisconnectWarning (remoteLabel, err) {
}
function shouldInjectWeb3 () {
- return doctypeCheck() && suffixCheck()
+ return doctypeCheck() && suffixCheck()
&& documentElementCheck() && !blacklistedDomainCheck()
}
diff --git a/gulpfile.js b/gulpfile.js
index 68618dfb4..cd523a107 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -75,7 +75,7 @@ gulp.task('copy:fonts', copyTask({
}))
gulp.task('copy:reload', copyTask({
source: './app/scripts/',
- destinations: commonPlatforms.map(platform => `./dist/${platform}/scripts`),
+ destinations: commonPlatforms.map(platform => `./dist/${platform}`),
pattern: '/chromereload.js',
}))
gulp.task('copy:html', copyTask({
@@ -243,10 +243,10 @@ function createTasksForBuildJsExtension({ buildJsFiles, taskPrefix, devMode, bun
const nonInpageFiles = buildJsFiles.filter(file => file !== 'inpage')
const buildPhase1 = ['inpage']
const buildPhase2 = nonInpageFiles
- const destinations = browserPlatforms.map(platform => `./dist/${platform}/scripts`)
+ const destinations = browserPlatforms.map(platform => `./dist/${platform}`)
bundleTaskOpts = Object.assign({
buildSourceMaps: true,
- sourceMapDir: devMode ? './' : '../../sourcemaps',
+ sourceMapDir: devMode ? './' : '../sourcemaps',
minifyBuild: !devMode,
buildWithFullPaths: devMode,
}, bundleTaskOpts)