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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng-juhe

v10.0.3

Published

ng-juhe schematics collection for angular-cli

Downloads

47

Readme

ng-juhe Schematics

Schematics

ng-add

添加 ng-zorro-antd 与它的依赖,并根据需要自动配置。

  • 添加 ng-zorro-antd 到 package.json
  • 替换 app.component.html 引导内容
  • 在根模块导入必要的模块
  • 导入必要的权限部分
  • 导入可能需要用到的组件
  • 将用于自定义的 theme.less 或编译后的 css 导入 angular.json

Use

Install Angular 9 (此项目已不在更新, 请转到 angular 10版本 ng-zhongyingjuhe)

npm install -g @angular/cli@9 @angular/core@9
ng new project_name
cd project_name
ng add ng-juhe

调试:

npm run start:remote

编译:

npm run build:online

创建懒加载模块: 创建一个名字为:lazy-page 懒加载模块

PS F:\study\test2> ng g ng-juhe:lazy lazy-page
CREATE src/app/routes/lazy-page/lazy-page-routing.module.ts (370 bytes)
CREATE src/app/routes/lazy-page/lazy-page.component.html (37 bytes)
CREATE src/app/routes/lazy-page/lazy-page.component.spec.ts (666 bytes)
CREATE src/app/routes/lazy-page/lazy-page.component.ts (318 bytes)
CREATE src/app/routes/lazy-page/lazy-page.module.ts (470 bytes)
UPDATE src/app/routes/routes-routing.module.ts (2128 bytes)

创建模块: 创建一个名字为:test-module 的module:

PS F:\study\test2> ng g ng-juhe:module test-module
CREATE src/app/routes/test-module/test-module-routing.module.ts (254 bytes)
CREATE src/app/routes/test-module/test-module.module.ts (391 bytes)

创建一个名字为:test-list 的列表页:

PS F:\study\test2> ng g ng-juhe:list test-list
? Specify which module name: test-module
CREATE src/app/routes/test-module/test-list/test-list.component.html (352 bytes)
CREATE src/app/routes/test-module/test-list/test-list.component.spec.ts (702 bytes)
CREATE src/app/routes/test-module/test-list/test-list.component.ts (1292 bytes)
UPDATE src/app/routes/test-module/test-module.module.ts (500 bytes)
UPDATE src/app/routes/test-module/test-module-routing.module.ts (397 bytes)

创建一个名字为:test-view 的信息页modal:

PS F:\study\test2> ng g ng-juhe:view test-view
? Specify which module name: test-module
? Would you like to modal mode? Yes
CREATE src/app/routes/test-module/test-view/test-view.component.html (586 bytes)
CREATE src/app/routes/test-module/test-view/test-view.component.spec.ts (702 bytes)
CREATE src/app/routes/test-module/test-view/test-view.component.ts (666 bytes)
UPDATE src/app/routes/test-module/test-module.module.ts (609 bytes)

创建一个名字为:test-edit 的编辑页

PS F:\study\test2> ng g ng-juhe:edit test-edit
? Specify which module name: test-module
? Would you like to modal mode? No
CREATE src/app/routes/test-module/test-edit/test-edit.component.html (545 bytes)
CREATE src/app/routes/test-module/test-edit/test-edit.component.spec.ts (702 bytes)
CREATE src/app/routes/test-module/test-edit/test-edit.component.ts (1664 bytes)
UPDATE src/app/routes/test-module/test-module.module.ts (719 bytes)
UPDATE src/app/routes/test-module/test-module-routing.module.ts (541 bytes)

创建一个名字为:test-empty 的空页

PS F:\study\test2> ng g ng-juhe:empty test-empty
? Specify which module name: routes
CREATE src/app/routes/routes/test-empty/test-empty.component.html (28 bytes)
CREATE src/app/routes/routes/test-empty/test-empty.component.spec.ts (685 bytes)
CREATE src/app/routes/routes/test-empty/test-empty.component.ts (320 bytes)
UPDATE src/app/routes/routes.module.ts (758 bytes)
UPDATE src/app/routes/routes-routing.module.ts (2101 bytes)

新增可选Tab标签路由复用

新建项目时, reuse设置 ture

目录结构

F:\
├─test-add
│  │  ├─.vscode
│  │  ├─e2e
│  │  │  └─src
│  │  ├─node_modules
│  │  ├─scripts
│  │  ├─src
│  │  │  ├─app
│  │  │  │  ├─components
│  │  │  │  │  ├─calendar
│  │  │  │  │  ├─form-modal
│  │  │  │  │  ├─search
│  │  │  │  │  └─user-select
│  │  │  │  ├─core
│  │  │  │  │  ├─net
│  │  │  │  │  └─startup
│  │  │  │  ├─layout
│  │  │  │  │  ├─default
│  │  │  │  │  │  ├─header
│  │  │  │  │  │  │  └─components
│  │  │  │  │  │  ├─setting-drawer
│  │  │  │  │  │  └─sidebar
│  │  │  │  │  ├─fullscreen
│  │  │  │  │  └─passport
│  │  │  │  ├─pipe
│  │  │  │  ├─routes
│  │  │  │  │  ├─callback
│  │  │  │  │  ├─dashboard
│  │  │  │  │  ├─exception
│  │  │  │  │  ├─passport
│  │  │  │  │  │  ├─lock
│  │  │  │  │  │  ├─login
│  │  │  │  │  │  ├─register
│  │  │  │  │  │  └─register-result
│  │  │  │  │  ├─routes
│  │  │  │  │  │  └─test-empty
│  │  │  │  │  ├─test-module
│  │  │  │  │  │  ├─test-edit
│  │  │  │  │  │  ├─test-list
│  │  │  │  │  │  └─test-view
│  │  │  │  │  └─welcome
│  │  │  │  └─shared
│  │  │  │      ├─st-widget
│  │  │  │      └─utils
│  │  │  ├─assets
│  │  │  │  └─tmp
│  │  │  │      ├─i18n
│  │  │  │      └─img
│  │  │  ├─environments
│  │  │  └─styles
│  │  ├─test
│  │  │  └─src
│  │  │      ├─app
│  │  │      │  ├─core
│  │  │      │  ├─layout
│  │  │      │  │  ├─default
│  │  │      │  │  │  ├─header
│  │  │      │  │  │  ├─setting-drawer
│  │  │      │  │  │  └─sidebar
│  │  │      │  │  ├─fullscreen
│  │  │      │  │  └─passport
│  │  │      │  └─routes
│  │  │      │      ├─dashboard
│  │  │      │      └─passport
│  │  │      │          ├─lock
│  │  │      │          ├─login
│  │  │      │          ├─register
│  │  │      │          └─register-result
│  │  │      ├─assets
│  │  │      │  └─tmp
│  │  │      │      ├─i18n
│  │  │      │      └─img
│  │  │      └─styles