mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
build - extension - move js files to toplevel
This commit is contained in:
parent
b88119c238
commit
253abd60fc
@ -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>
|
||||
|
@ -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/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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()
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user