chore: add Edge target

pull/145/head
dessant 4 years ago
parent 865514e017
commit c9bbd0eee9

@ -140,12 +140,12 @@ gulp.task('manifest', function(done) {
jsonMerge({
fileName: 'manifest.json',
edit: (parsedJson, file) => {
if (['chrome', 'opera'].includes(targetEnv)) {
if (['chrome', 'edge', 'opera'].includes(targetEnv)) {
delete parsedJson.applications;
delete parsedJson.options_ui.browser_style;
}
if (['chrome', 'firefox'].includes(targetEnv)) {
if (['chrome', 'edge', 'firefox'].includes(targetEnv)) {
delete parsedJson.minimum_opera_version;
}

@ -7,19 +7,22 @@
"scripts": {
"_build": "cross-env NODE_ENV=development gulp",
"build:chrome": "cross-env TARGET_ENV=chrome yarn _build",
"build:edge": "cross-env TARGET_ENV=edge yarn _build",
"build:firefox": "cross-env TARGET_ENV=firefox yarn _build",
"build:opera": "cross-env TARGET_ENV=opera yarn _build",
"build:all": "run-s 'build:@(chrome|firefox|opera)'",
"build:all": "run-s 'build:@(chrome|edge|firefox|opera)'",
"_build:prod": "cross-env NODE_ENV=production gulp",
"build:prod:chrome": "cross-env TARGET_ENV=chrome yarn _build:prod",
"build:prod:edge": "cross-env TARGET_ENV=edge yarn _build:prod",
"build:prod:firefox": "cross-env TARGET_ENV=firefox yarn _build:prod",
"build:prod:opera": "cross-env TARGET_ENV=opera yarn _build:prod",
"build:prod:all": "run-s 'build:prod:@(chrome|firefox|opera)'",
"build:prod:all": "run-s 'build:prod:@(chrome|edge|firefox|opera)'",
"_build:prod:zip": "yarn _build:prod && gulp zip",
"build:prod:zip:chrome": "cross-env TARGET_ENV=chrome yarn _build:prod:zip",
"build:prod:zip:edge": "cross-env TARGET_ENV=edge yarn _build:prod:zip",
"build:prod:zip:firefox": "cross-env TARGET_ENV=firefox yarn _build:prod:zip",
"build:prod:zip:opera": "cross-env TARGET_ENV=opera yarn _build:prod:zip",
"build:prod:zip:all": "run-s 'build:prod:zip:@(chrome|firefox|opera)'",
"build:prod:zip:all": "run-s 'build:prod:zip:@(chrome|edge|firefox|opera)'",
"start": "web-ext run -s dist/firefox",
"start:android": "yarn start -t firefox-android",
"inspect": "cross-env NODE_ENV=production gulp inspect",

@ -13,7 +13,7 @@ function createTab(
if (index !== null) {
props.index = index;
}
if (openerTabId !== null && ['chrome', 'opera'].includes(targetEnv)) {
if (openerTabId !== null && ['chrome', 'edge', 'opera'].includes(targetEnv)) {
props.openerTabId = openerTabId;
}
return browser.tabs.create(props);

Loading…
Cancel
Save