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

ayd-cli

v1.0.2

Published

Command line interface for rapid ayd development

Downloads

1

Readme

前端 cli 工具

命令

$ npm install -g ayd-cli
# OR
$ yarn global add ayd-cli

$ ayd create <project-name>

内容

init

初始化全局.aydrc文件

{
	"VUE_ADMIN_TEMPLATE_REPO": "",
    "config": {
     	"configurable": true // 是否配置化
   }
}

create

可用命令

用法

$ ayd create .
$ ayd create <project-name>

$ ayd create
# error: missing required argument 'app-name'

config

可用命令

用法

1. get

$ ayd config -g configurable
# true
$ ayd config -g configurable --json
# {
# 	"value": true
# }

2. set

$ ayd config -s configurable false
# You have updated the option: configurable to false

3. delete

$ ayd config -d configurable
# You have removed the option: configurable

4. json

$ ayd config --json
# {
#   "resolvedPath": "/Users/lxs24sxl/.aydrc",
#   "content": {
#     "VUE_ADMIN_TEMPLATE_REPO": "",
#     "config": {
#       "configurable": true
#     }
#   }
# }

命令提醒

$ ayd creat

# Usage: ayd <command> [options]

# Options:
#   -V, --version                output the version number
#   -h, --help                   display help for command

# Commands:
#   create [options] <app-name>  create a new project powered by ayd-cli-service
#   init                         initialize the .aydrc file
#   config [options] [value]     inspect and modify the config
#   Run ayd <command> --help for detailed usage of given command.

#   Unknown command creat.

#   Did you mean create.
$ ayd -V
# ayd-cli 1.0.0

常见问题

1. 如果屏蔽这些命令交互?

? 请输入后台模版名称 默认后台模版
? 请输入后台模版路由名( 路由为空则为一级路由,否则为二级路由,例:/retail/ )
? 请输入后台模版系统编码( 传递给后端的名称,例:admin-retail ) admin-test
? 请输入端口号 8081

解决方法

$ ayd config -s configurable false

2. 如何在create之前先屏蔽上面的命令交互?

解决方法

先跑init生成.aydrc文件,再进行修改

$ ayd init
$ ayd config -s configurable false
$ ayd create <project-name>

3. 如何添加自己的模版?

解决方法

  • 目前版本定义框架为vue或react,模版类型为admin/standard/mobile。
  • 添加需要的模板路径只需要使用config命令配置不同的repo地址
  • repo配置方法详细见download-git-repo
  • 常用repo配置法: gitlab -> gitlab地址:gitlab中项目地址#分支名, github -> github地址:github名称/项目地址#分支名
$ ayd config -s VUE_STANDARD_TEMPLATE_REPO <repo>
$ ayd config -s REACT_ADMIN_TEMPLATE_REPO <repo>