fix run scripts, but for real. Fix related stuff as well
This commit is contained in:
parent
9338711d4c
commit
dd74725c0a
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -11,7 +11,7 @@
|
||||
"port":6000,
|
||||
"reAttach": true,
|
||||
"addonType": "webExtension",
|
||||
"addonPath": "${workspaceFolder}/dist",
|
||||
"addonPath": "${workspaceFolder}/dist-ff",
|
||||
}
|
||||
],
|
||||
"firefox": {
|
||||
|
@ -4,11 +4,11 @@
|
||||
"description": "Aspect ratio fixer for youtube and other sites, with automatic aspect ratio detection. Supports ultrawide and other ratios.",
|
||||
"author": "Tamius Han <tamius.han@gmail.com>",
|
||||
"scripts": {
|
||||
"start": "cross-env HMR=true npm run build:dev -- --watch",
|
||||
"start": "npm run dev",
|
||||
"build": "cross-env NODE_ENV=production BROWSER=firefox CHANNEL=stable webpack --hide-modules",
|
||||
"build-chrome": "cross-env NODE_ENV=production BROWSER=chrome CHANNEL=stable webpack --hide-modules",
|
||||
"build-edge": "cross-env NODE_ENV=production BROWSER=edge CHANNEL=stable webpack --hide-modules",
|
||||
"build:dev": "cross-env NODE_ENV=development BROWSER=firefox CHANNEL=dev webpack --hide-modules",
|
||||
"build:dev": "webpack --hide-modules",
|
||||
"build-testing": "cross-env NODE_ENV=development BROWSER=firefox CHANNEL=testing webpack --hide-modules",
|
||||
"build-nightly": "cross-env NODE_ENV=development BROWSER=firefox CHANNEL=nightly webpack --hide-modules",
|
||||
"build-testing-chrome": "cross-env NODE_ENV=development BROWSER=chrome CHANNEL=testing webpack --hide-modules",
|
||||
@ -16,7 +16,7 @@
|
||||
"build-chrome:dev": "cross-env NODE_ENV=development BROWSER=chrome webpack --hide-modules",
|
||||
"build-all": "rm ./dist-zip/uw-amo-source.zip; mv ./dist-zip/*.zip ./dist-zip/old/; npm run build; node scripts/build-zip.js ff; npm run build-chrome; node scripts/build-zip.js chrome; ./scripts/prepare-amo-source.sh",
|
||||
"build-zip": "node scripts/build-zip.js",
|
||||
"dev": "concurrently \"cross-env NODE_ENV=development BROWSER=firefox CHANNEL=dev webpack --hide-modules\" \"cross-env NODE_ENV=development BROWSER=chrome CHANNEL=dev webpack --hide-modules\""
|
||||
"dev": "cross-env NODE_ENV=development CHANNEL=dev concurrently \"cross-env BROWSER=firefox npm run build:dev -- --watch\" \"cross-env BROWSER=chrome npm run build:dev -- --watch\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/core-js": "^2.5.0",
|
||||
|
@ -4,8 +4,8 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const archiver = require('archiver');
|
||||
|
||||
const extractExtensionData = () => {
|
||||
const extPackageJson = require('../dist/manifest.json');
|
||||
const extractExtensionData = (browserPostfix) => {
|
||||
const extPackageJson = require(`../dist-${browserPostfix}/manifest.json`);
|
||||
|
||||
return {
|
||||
name: extPackageJson.name,
|
||||
@ -39,13 +39,13 @@ const buildZip = (src, dist, zipFilename) => {
|
||||
const main = () => {
|
||||
const browser = process.argv[2];
|
||||
const testingOrNightly = process.argv[3];
|
||||
let distDir;
|
||||
let browserPostfix;
|
||||
if (browser == 'firefox') {
|
||||
distDir = '../dist-ff';
|
||||
browserPostfix = 'ff';
|
||||
} else {
|
||||
distDir = `../dist-${browser}`
|
||||
browserPostfix = browser;
|
||||
}
|
||||
const destDir = path.join(__dirname, distDir);
|
||||
const destDir = path.join(__dirname, `../dist-${browserPostfix}`);
|
||||
const zipDir = path.join(__dirname, '../dist-zip');
|
||||
const {name, version} = extractExtensionData();
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const BUNDLE_DIR = path.join(__dirname, '../dist');
|
||||
const BUNDLE_DIR = path.join(__dirname, `../dist-${process.env.BROWSER === 'firefox' ? 'ff' : process.env.BROWSER}`);
|
||||
const bundles = [
|
||||
'popup/popup.js',
|
||||
'options/options.js',
|
||||
|
Loading…
Reference in New Issue
Block a user