youtubei.js
v3.1.0 yt dl ytdl youtube youtubedl youtube-dl youtube-downloader youtube-music youtube-studio and 11 more...
lint
npx eslint ./src
test
npx jest --verbose
build
npm run build:parser-map && npm run build:proto && npm run build:esm && npm run bundle:node && npm run bundle:browser && npm run bundle:browser:prod
watch
npx tsc --watch
prepare
npm run build
lint:fix
npx eslint --fix ./src
build:esm
npx tsc
build:deno
npx cpy ./src ./deno && npx cpy ./package.json ./deno && npx replace ".js';" ".ts';" ./deno -r && npx replace '.js";' '.ts";' ./deno -r && npx replace "'linkedom';" "'https://esm.sh/linkedom';" ./deno -r && npx replace "'jintr';" "'https://esm.sh/jintr';" ./deno -r && npx replace "new Jinter.default" "new Jinter" ./deno -r
build:proto
npx pb-gen-ts --entry-path="src/proto" --out-dir="src/proto/generated" --ext-in-import=".js"
bundle:node
npx esbuild ./dist/src/platform/node.js --bundle --target=node10 --keep-names --format=cjs --platform=node --outfile=./bundle/node.cjs --external:jintr --external:undici --external:linkedom --sourcemap --banner:js="/* eslint-disable */"
bundle:browser
npx esbuild ./dist/src/platform/web.js --banner:js="/* eslint-disable */" --bundle --target=chrome58 --keep-names --format=esm --sourcemap --define:global=globalThis --outfile=./bundle/browser.js --platform=browser
build:parser-map
node ./scripts/build-parser-map.cjs
bundle:browser:prod
npm run bundle:browser -- --outfile=./bundle/browser.min.js --minify