changes for 1.2.5

This commit is contained in:
Andrei O 2023-03-11 17:30:46 +02:00
parent 218e5a90d5
commit 537e371cea
No known key found for this signature in database
GPG Key ID: B961E5B68389457E
3 changed files with 18 additions and 3 deletions

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## Manifest Version 1.2.5
- improve post build script
## Manifest Version 1.2.4 ## Manifest Version 1.2.4
- updated showing assets page to use new api - updated showing assets page to use new api

View File

@ -1,10 +1,21 @@
(async () => { (async () => {
const CONTENT_BUILD_PATH = 'src/extension/content.js' const CONTENT_BUILD_PATH = 'src/extension/content.js'
const METAMASK_STUB_PATH = 'src/extension/metamask-stub.js'
const fs = (await import('fs')).default const fs = (await import('fs')).default
const path = (await import('path')).default
const pkg = JSON.parse(fs.readFileSync('dist/manifest.json').toString()); const pkg = JSON.parse(fs.readFileSync('dist/manifest.json').toString());
pkg.content_scripts[0].js[0] = CONTENT_BUILD_PATH pkg.content_scripts[0].js[0] = CONTENT_BUILD_PATH
pkg.content_scripts[1].js[0] = METAMASK_STUB_PATH
fs.writeFileSync('dist/manifest.json', JSON.stringify(pkg, null, 2)) fs.writeFileSync('dist/manifest.json', JSON.stringify(pkg, null, 2))
// fs.writeFileSync('dist/rules.js', fs.readFileSync('rules.json').toString()) // fs.writeFileSync('dist/rules.js', fs.readFileSync('rules.json').toString())
fs.writeFileSync('dist/'+ CONTENT_BUILD_PATH, fs.readFileSync('src/extension/content.js').toString()) fs.writeFileSync('dist/'+ CONTENT_BUILD_PATH, fs.readFileSync('src/extension/content.js').toString())
})(); fs.writeFileSync('dist/'+ METAMASK_STUB_PATH, fs.readFileSync('src/extension/metamask-stub.js').toString())
const directory = 'dist/assets/';
fs.readdir(directory, (err, files) => {
files.forEach(file => {
if(file.startsWith('content'))
fs.unlinkSync( path.resolve(directory + file))
});
});
})();

View File

@ -3,8 +3,8 @@
"name": "__MSG_appName__", "name": "__MSG_appName__",
"description": "__MSG_appDesc__", "description": "__MSG_appDesc__",
"default_locale": "en", "default_locale": "en",
"version": "1.2.4", "version": "1.2.5",
"version_name": "1.2.4", "version_name": "1.2.5",
"icons": { "icons": {
"16": "assets/extension-icon/wallet_16.png", "16": "assets/extension-icon/wallet_16.png",
"32": "assets/extension-icon/wallet_32.png", "32": "assets/extension-icon/wallet_32.png",