Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>PackhouseNew to Visual Studio Code? Get it now.
Packhouse

Packhouse

khczhihao

|
35 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Packhouse

這是Packhouse的擴展。

功能

主要是加強引用關聯,補足TS Type沒辦法對應的功能:

自動找尋Group

find-group

自動建構參數

auto-arg

Hover訊息

hover

前往Define

gotodefine

使用條件

該擴展的觸發機制是判斷有無.packhouse的資料夾,內部的資料必須藉由Packhouse CLI來建構,因此你可能需要:

npm install packhouse-cli -g

在你的Packhouse專案中的packhouse.json加入以下這段:

--main的對象主要是Packhouse.Main() export 的檔案。

{
    "script": {
        "read": "packhouse read --watch --main ./src/main.js",
        // typescript請使用以下這段
        "read-ts": "packhouse read --ts --watch --main ./src/main.ts"
    }
}

並且運行:

npm run read

or

npm run read-ts

此時你應該能發現.packhouse已經被建立,如果擴展沒有被觸發,可以考慮重整VScode。

當--watch時會在你修改檔案時重新建構.packhouse的結構,此時擴展也會同步更新,因此建議在開發時保持啟動。

常用Snippets

handler.tool

self.tool()
    .noGood(self.error)

handler.line

self.line()()
    .action(self.access())

step

function name(self, next) {
    // ...do something
}

step.tool

function name(self, next) {
    self.tool()
        .always(next)
        .noGood(e => self.response(e, 500))
    }
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft