Skip to content

Commit

Permalink
scripts\yarn upgrade to latest.ahk
Browse files Browse the repository at this point in the history
  • Loading branch information
FuPeiJiang committed Jun 22, 2021
1 parent 8126723 commit 97bae45
Show file tree
Hide file tree
Showing 3 changed files with 339 additions and 348 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
"devDependencies": {
"@types/expect": "^24.3.0",
"@types/mocha": "^8.2.2",
"@types/node": "^14.14.22",
"@typescript-eslint/eslint-plugin": "^4.14.1",
"@typescript-eslint/parser": "^4.14.1",
"@types/node": "^15.12.4",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
"dts-bundle": "^0.7.3",
"eslint": "^7.18.0",
"mocha": "^9.0.0",
"ts-loader": "^8.1.0",
"eslint": "^7.29.0",
"mocha": "^9.0.1",
"ts-loader": "^9.2.3",
"ts-mocha": "^8.0.0",
"ts-node-dev": "^1.1.1",
"typescript": "^4.1.3",
"webpack": "^5.30.0",
"webpack-cli": "^4.6.0"
"ts-node-dev": "^1.1.6",
"typescript": "^4.3.4",
"webpack": "^5.40.0",
"webpack-cli": "^4.7.2"
},
"scripts": {
"extractedTests": "ts-mocha mocha/AHK-v2-script-converter.ts",
Expand Down
43 changes: 43 additions & 0 deletions scripts/yarn upgrade to latest.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance, force
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetBatchLines, -1
#KeyHistory 0
ListLines Off

setMouseDelay, -1
SetKeyDelay, 10
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1

arr:=StrSplit(clipboard, "`n", "`r")
finalStr:=""
for k,v in arr {
if (Trim(v)) {
packageName:=string_getBetween(v, """", """", false)
if (packageName) {
finalStr.=" """ packageName "@latest"""
}
}
}
toRun:= "yarn add -D" finalStr "`r"

if winactive("ahk_exe code.exe") {
vscodeRun(toRun)
} else {
clipboard:=toRun
}

return
vscodeRun(g4Commands)
{
MouseGetPos, Xpos, Ypos
Click, 1161, 1038

Send, % g4Commands
MouseMove, Xpos, Ypos
}

f3::Exitapp
Loading

0 comments on commit 97bae45

Please sign in to comment.