1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

build - extension - move js files to toplevel

This commit is contained in:
kumavis 2018-03-28 21:29:57 -07:00
parent b88119c238
commit 253abd60fc
6 changed files with 14 additions and 14 deletions

View File

@ -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>

View File

@ -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,7 +62,7 @@
"https://*.infura.io/"
],
"web_accessible_resources": [
"scripts/inpage.js"
"inpage.js"
],
"externally_connectable": {
"matches": [

View File

@ -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>

View File

@ -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>

View File

@ -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:

View File

@ -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)