diff --git a/package.json b/package.json index d1c01766..f872918d 100644 --- a/package.json +++ b/package.json @@ -84,21 +84,24 @@ "scripts": { "test": "playwright test", "test:debug": "DEBUG=pw:browser* playwright test", - "start": "tsc && npm run copy-files && electron ./dist/index.js", + "start": "npm run tsc-and-copy && electron ./dist/index.js", "start:debug": "ELECTRON_ENABLE_LOGGING=1 electron ./dist/index.js", "generate:package": "node utils/generate-package-json.js", "postinstall": "npm run plugins", "clean": "del-cli dist && del-cli pack", + "ytm-css-copy-files": "copyfiles youtube-music.css dist/", "copy-files": "copyfiles -u 1 plugins/**/*.html plugins/**/*.css plugins/**/*.bin plugins/**/*.js dist/plugins/", - "build": "npm run clean && tsc && npm run copy-files && electron-builder --win --mac --linux -p never", - "build:linux": "npm run clean && tsc && npm run copy-files && electron-builder --linux -p never", - "build:mac": "npm run clean && tsc && npm run copy-files && electron-builder --mac dmg:x64 -p never", - "build:mac:arm64": "npm run clean && tsc && npm run copy-files && electron-builder --mac dmg:arm64 -p never", - "build:win": "npm run clean && tsc && npm run copy-files && electron-builder --win -p never", - "build:win:x64": "npm run clean && tsc && npm run copy-files && electron-builder --win nsis:x64 -p never", + "tsc-and-copy": "tsc && npm run plugin:adblocker-without-tsc && npm run ytm-css-copy-files && npm run copy-files", + "build": "npm run clean && npm run tsc-and-copy && electron-builder --win --mac --linux -p never", + "build:linux": "npm run clean && npm run tsc-and-copy && electron-builder --linux -p never", + "build:mac": "npm run clean && npm run tsc-and-copy && electron-builder --mac dmg:x64 -p never", + "build:mac:arm64": "npm run clean && npm run tsc-and-copy && electron-builder --mac dmg:arm64 -p never", + "build:win": "npm run clean && npm run tsc-and-copy && electron-builder --win -p never", + "build:win:x64": "npm run clean && npm run tsc-and-copy && electron-builder --win nsis:x64 -p never", "lint": "xo", "changelog": "auto-changelog", "plugins": "npm run plugin:adblocker && npm run plugin:bypass-age-restrictions", + "plugin:adblocker-without-tsc": "del-cli plugins/adblocker/ad-blocker-engine.bin && node dist/plugins/adblocker/blocker.js", "plugin:adblocker": "del-cli plugins/adblocker/ad-blocker-engine.bin && tsc && node dist/plugins/adblocker/blocker.js", "plugin:bypass-age-restrictions": "del-cli node_modules/simple-youtube-age-restriction-bypass/package.json && npm run generate:package simple-youtube-age-restriction-bypass", "release:linux": "npm run clean && electron-builder --linux -p always -c.snap.publish=github",