npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@oliver721003/schematics

v19.3.1

Published

A blank schematics

Readme

@oliver721003/schematics

資料型別 (data-model)

語法

ng g @oliver721003/schematics:data-model <name>
ng g @oliver721003/schematics:dm <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ----------- | ---- | ---------------- | ---- | | name | | 領域資料模型名稱 | v | | description | | 領域資料模型描述 | v | | type | -t | 模型類型 | v | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

參數列舉值

  • type
    • 資料模型 (data-model)
    • 領域模型 (domain-model)

一般元件 (component)

語法

ng g @oliver721003/schematics:component <name>
ng g @oliver721003/schematics:c <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ----------- | ---- | ---------------------- | ---- | | name | | 元件名稱 | v | | description | | 元件描述 | v | | skipTests | | 是否跳過測試 (boolean) | | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

功能元件 (feature)

語法

ng g @oliver721003/schematics:feature <name>
ng g @oliver721003/schematics:f <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ----------- | ---- | ---------------------- | ---- | | name | | 元件名稱 | v | | description | | 元件描述 | v | | skipTests | | 是否跳過測試 (boolean) | | | project | | 目標專案 | |

彈跳視窗元件 (dialog)

語法

ng g @oliver721003/schematics:dialog <name>
ng g @oliver721003/schematics:d <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ----------- | ---- | ---------------------------- | ---- | | name | | 元件名稱 | v | | description | | 元件描述 | v | | eagerOpen | -o | 測試時是否自動開啟 (boolean) | | | width | -w | 寬度 (number) | | | height | -h | 高度 (number) | | | skipTests | | 是否跳過測試 (boolean) | | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

表單元件 (form-component)

語法

ng g @oliver721003/schematics:form-component <name>
ng g @oliver721003/schematics:fc <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ----------- | ---- | ---------------------- | ---- | | name | | 元件名稱 | v | | dataType | -t | 資料型別名稱 | v | | description | | 元件描述 | v | | validate | -v | 驗證類型 | v | | skipTests | | 是否跳過測試 (boolean) | | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

參數列舉值

  • validate

    • 沒有驗證 (none)
    • 同步驗證 (validate)
    • 非同步驗證 (asyncValidate)

表單欄位 (form-property)

語法

ng g @oliver721003/schematics:form-property <name>
ng g @oliver721003/schematics:fp <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ------------------ | ---- | ----------------------- | ---- | | name | | 元件名稱 | v | | dataType | -t | 資料型別 | v | | loadFull | | 是否全部載入 (boolean) | | | selectedProperties | -p | 欄位名稱清單 (逗號分隔) | | | dataModelPath | | 驗證類型 | | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

表單測試 (form-spec)

語法

ng g @oliver721003/schematics:form-spec <componentType> <name> <property> <type>
ng g @oliver721003/schematics:fs <componentType> <name> <property> <type>

參數

| 參數 | 別名 | 說明 | 必填 | | -------- | ---- | ------------------------ | ---- | | name | | 元件名稱 | v | | property | -p | 欄位名稱 | v | | type | -t | 表單類型 | v | | index | | 索引位置 (number) | | | optional | | 是否不一定存在 (boolean) | | | label | | 文字標題 | | | methods | | 要實作的測試函式 (多選) | v | | project | | 目標專案 | |

  • indexoptionallabel 擇一指定

參數列舉值

  • type

    • 按鈕 (button)
    • 文字輸入框 (input)
    • 文字輸入框 (input)
    • SlideToggle (slide-toggle)
  • methods

    • when - 表單欄位輸入選擇或點選函式"
    • thenOption - 選單項目內容驗證 (只限類型為 select)"
    • thenExists - 表單控制項是否存在驗證"
    • thenError - 表單欄位錯誤訊息驗證 (類型為 button, slide-toggle 不產生)"
    • thenEnabled - 表單控制項啟用驗證"
    • thenDisabled - 表單控制項停用驗證"

測試工具類別 (harness)

語法

ng g @oliver721003/schematics:harness <name>
ng g @oliver721003/schematics:h <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ----------- | ---- | -------------- | ---- | | name | | 元件名稱 | v | | description | | 元件描述 | v | | type | -t | 元件類型 | v | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

參數列舉值

  • type

    • 表單元件 (form-component)

測試工具方法 (harness-property)

語法

ng g @oliver721003/schematics:harness-property <name> <property> <type>
ng g @oliver721003/schematics:hp <name> <property> <type>

參數

| 參數 | 別名 | 說明 | 必填 | | -------- | ---- | ------------------------ | ---- | | name | | 元件名稱 | v | | property | -p | 欄位名稱 | v | | type | -t | 表單類型 | v | | index | | 索引位置 (number) | | | optional | | 是否不一定存在 (boolean) | | | label | | 文字標題 | v | | methods | | 要實作的測試函式 (多選) | v | | project | | 目標專案 | |

  • indexoptionallabel 擇一指定

參數列舉值

  • type

    • 按鈕 (button)
    • 文字輸入框 (input)
    • 文字輸入框 (input)
    • SlideToggle (slide-toggle)
  • methods

    • input - 表單欄位輸入或選擇函式
    • getValue - 表單欄位取值函式

資料服務介面 (interface)

語法

ng g @oliver721003/schematics:interface <name> <type>
ng g @oliver721003/schematics:i <name> <type>

參數

| 參數 | 別名 | 說明 | 必填 | | ------------- | ---- | ----------------------- | ---- | | name | | 資料模型名稱 | v | | type | -t | 服務類型 | v | | methods | -m | 要實作的服務函式 (多選) | | | id | | 主鍵編號型別 | | | dataModelPath | | 資料模型路徑 | | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

參數列舉值

  • type

    • 資料服務 (data)
    • 遠端服務 (remote)
  • methods

    • get - 實作資料取得方法
    • getList - 清單資料取得方法
    • getResult - 清單資料與個數取得方法
    • add - 新增資料方法
    • update - 更新資料方法
    • remove - 刪除資料方法
  • id

    • 字串 (string)
    • 整數 (number)

資料服務 (data-service)

語法

ng g @oliver721003/schematics:data-service <name>
ng g @oliver721003/schematics:ds <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ------------- | ---- | -------------------------- | ---- | | name | | 資料模型名稱 | v | | interface | -i | 是否使用對應介面 (boolean) | | | interfacePath | | 服務介面路徑 | | | dataModelPath | | 資料模型路徑 | | | skipTests | | 是否跳過測試 (boolean) | | | project | | 目標專案 | |

遠端服務 (remote-service)

語法

ng g @oliver721003/schematics:remote-service <name>
ng g @oliver721003/schematics:rs <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ------------- | ---- | -------------------------- | ---- | | name | | 資料模型名稱 | v | | interface | -i | 是否使用對應介面 (boolean) | | | interfacePath | | 服務介面路徑 | | | dataModelPath | | 資料模型路徑 | | | skipTests | | 是否跳過測試 (boolean) | | | project | | 目標專案 | |

資料服務間諜 (spy-service)

語法

ng g @oliver721003/schematics:spy-service <name>
ng g @oliver721003/schematics:ss <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ------------- | ---- | -------------- | ---- | | name | | 資料模型名稱 | v | | interfacePath | | 服務介面路徑 | | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

資料表元件 (data-table)

語法

ng g @oliver721003/schematics:data-table <dataType> <type>
ng g @oliver721003/schematics:dt <dataType> <type>

參數

| 參數 | 別名 | 說明 | 必填 | | ----------- | ---- | ---------------------- | ---- | | dataType | -t | 資料類型 | v | | type | | 資料表類型 | v | | name | | 元件名稱 | | | description | | 領域資料模型描述 | | | skipTests | | 是否跳過測試 (boolean) | | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

參數列舉值

  • type

    • 基本型 (basic)
    • 分頁型 (pagination)

資料來源 (data-source)

語法

ng g @oliver721003/schematics:data-source <dataType> <type>

參數

| 參數 | 別名 | 說明 | 必填 | | ----------- | ---- | ---------------------- | ---- | | dataType | | 資料類型 | v | | type | | 資料表類型 | v | | description | | 領域資料模型描述 | v | | useService | -s | 是否使用服務 (boolean) | | | index | | 匯出索引檔位置 | | | project | | 目標專案 | |

參數列舉值

  • type

    • 基本型 (basic)
    • 分頁型 (pagination)

資料表欄位 (table-property)

語法

ng g @oliver721003/schematics:table-property <name>
ng g @oliver721003/schematics:tp <name>

參數

| 參數 | 別名 | 說明 | 必填 | | ------------------ | ---- | ----------------------- | ---- | | name | | 元件名稱 | v | | enumType | -e | 列舉型別 (逗號分隔) | | | fullProperty | -f | 是否全部載入 (boolean) | | | selectedProperties | -p | 欄位名稱清單 (逗號分隔) | | | project | | 目標專案 | |