Skip to content

Commit

Permalink
0.1.9-alpha.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaoboy committed May 26, 2024
1 parent a0d4500 commit 14f7063
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 7 deletions.
23 changes: 16 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@mpv-easy/mpsm-scripts",
"private": true,
"version": "0.1.6",
"version": "0.1.9-alpha.2",
"files": ["bin", "dist", "es5", "bundle", "readme.md", "package.json"],
"description": "@mpv-easy/mpsm-scripts",
"main": "./dist/index.js",
Expand All @@ -10,8 +9,9 @@
"scripts": {
"bundle": "esbuild ./src/*.ts --bundle --outdir=./bundle",
"meta": "tsx ./build/meta.ts",
"build": "pnpm run bundle && pnpm run es5 && pnpm run meta",
"dev": "chokidar \"./src/*.(ts|tsx|json)\" -c \"pnpm run build && pnpm run copy\" -t 3000 --initial",
"build": "tsc && pnpm run bundle && pnpm run es5 && pnpm run meta",
"dev": "chokidar \"./src/*.(ts|tsx|json)\" -c \"pnpm run build\" -t 3000 --initial",
"dev:copy": "chokidar \"./src/*.(ts|tsx|json)\" -c \"pnpm run build && pnpm run copy\" -t 3000 --initial",
"copy": "cp -r ./es5/*.js $MPV_SCRIPT_DIR/",
"es5": "babel --presets @babel/preset-env ./bundle -d es5 --plugins ./babel/hack.js",
"lint": "biome check --apply-unsafe ./",
Expand All @@ -20,15 +20,24 @@
"keywords": [],
"author": "",
"license": "ISC",
"exports": {
"./*": "./dist/*.js"
},
"typesVersions": {
"*": {
"./*": ["./dist/*.d.ts"]
}
},
"devDependencies": {
"@babel/cli": "^7.23.9",
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/preset-typescript": "^7.23.3",
"@biomejs/biome": "^1.5.3",
"@mpv-easy/autoload": "0.1.6-alpha.7",
"@mpv-easy/plugin": "^0.1.5",
"@mpv-easy/tool": "^0.1.5",
"@mpv-easy/autoload": "0.1.9-alpha.1",
"@mpv-easy/plugin": "0.1.9-alpha.1",
"@mpv-easy/tool": "0.1.9-alpha.1",
"@mpv-easy/polyfill": "0.1.9-alpha.1",
"@types/node": "^20.12.12",
"chokidar": "^3.6.0",
"chokidar-cli": "^3.0.0",
Expand Down
1 change: 1 addition & 0 deletions scripts.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"sub2clipboard": "https://github.com/mpv-easy/mpsm-scripts/releases/latest/download/sub2clipboard.js",
"firequalizer15": "https://github.com/mpv-easy/mpsm-scripts/releases/latest/download/firequalizer15.meta.lua",
"visualizer": "https://github.com/mpv-easy/mpsm-scripts/releases/latest/download/visualizer.meta.lua",
"autocrop": "https://github.com/mpv-easy/mpsm-scripts/releases/latest/download/autocrop.meta.lua",
Expand Down
1 change: 1 addition & 0 deletions src/autoload.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@mpv-easy/polyfill";
import { autoload } from "@mpv-easy/autoload";
import { updatePlaylist, getMpvPlaylist, registerEvent } from "@mpv-easy/tool";

Expand Down
1 change: 1 addition & 0 deletions src/speed.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@mpv-easy/polyfill";
import { PropertyNumber, addKeyBinding } from "@mpv-easy/tool";
const speed = new PropertyNumber("speed");
let mpvSpeed = speed.value;
Expand Down
7 changes: 7 additions & 0 deletions src/sub2clipboard.meta.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// ==UserScript==
// @name sub2clipboard
// @version 0.1.1
// @description Copy subtitles to clipboard
// @author mpv-easy
// @downloadURL https://github.com/mpv-easy/mpsm-scripts/releases/latest/download/sub2clipboard.js
// ==/UserScript==
8 changes: 8 additions & 0 deletions src/sub2clipboard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import "@mpv-easy/polyfill";
import { setClipboard, print, observeProperty } from "C:/wt/mpv-easy/mpv-tool";

observeProperty("sub-text", "string", (_, v) => {
if (v) {
setClipboard(v);
}
});
2 changes: 2 additions & 0 deletions src/vlc-aspect-ratio.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import "@mpv-easy/polyfill";

import {
print,
addKeyBinding,
Expand Down

0 comments on commit 14f7063

Please sign in to comment.