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

@winfe/cli-plugin-init

v1.5.27

Published

## winex init

Downloads

68

Readme

初始化一个项目

winex init

运行以下命令来初始化一个新项目:

winex init --name <app-name>

winex-cli可以适用于多个项目初始化场景, 目前包括:

  • 一般业务产品项目(normal)
  • 脚手架插件项目(cli-plugin)
  • 物料项目(material), 包括区块、业务组件、页面模板、业务项目模板等)

开发者可以根据实际情况进行选择.

CLI preview

normal

一般初始化流程

一般业务项目模板资源包, 通常需要对以下类别选择后完成定位:

  • domain 项目所属域(详见Domains)
  • qiankun 项目类型(详见Options中qiankun配置可选项)

初始化项目时, 项目的versiondescription选项配置, 非必填项, 默认版本为0.0.1, 描述为A project created by winex-cli. 可以根据实际需要进行修改.

CLI preview

模板选择完毕时, winex还会问询开发者是否需要对远程仓库进行初始化, 如需要, 则winex-cli会要求填写repository url, 用于关联远程仓库地址.

固定项目模板

当开发者已经有明确的模板下载目标时, 可以直接指定template选项进行项目初始化. 以物料资源测试模板为例, 运行以下命令:

winex init --name hello-world --template @winexmaterial-scaffolds/wn-vue2.x-template

CLI preview

指定项目模板时, 会对模板名称进行合法性检测, 需满足以下条件:

  • 有效的npm命名规则
  • 有效的winning项目模板资源(包括name、version)

Options

winex init 命令还有一些可选项, 可以使用--help指令查看具体的参数说明:

CLI preview

| 选项名称(option) | 缩写 | 选项说明 | 可选值 | |---------- |-------- |-------- |-------- | | --name | -n | 项目名称(同outdir) | - | | --type | - | 初始化项目的类型(普通业务项目、插件项目、物料项目及其他) | normal(默认)、cli-plugin等 | | --domain | - | 选择业务项目所属域 | 见Domains表详情 | |--qiankun | -qk |选择初始化业务项目时,需选择业务应用类型(主应用、子应用、独立项目) |app-indep(默认)、app-main、app-sub| |--template | -t | 模板npm包名称 | - | |--version | -v | 项目版本号 | 0.0.1(默认) | |--description | -desc | 项目描述 | A project created by winex-cli(默认) | |--repository | -r |项目git仓库地址 |tfs/gitlab/github等git仓库地址| |--registry | - |设置npm源 | https://registry.npmjs.org/| |--packageManager | -pm | 设置node包管理工具 | yarn(默认)/npm/cnpm| |--path | - |项目存储地址(绝对地址) |默认为当前运行路径|

Domains

| 域 | 含义 | |---------- |-------- | | common | 公共仓库 | | finance | 费用域 | | clinical | 临床域 | | execution | 执行域 | | person | 患者域 | | encouter | 就诊域 | | record | 记录域 | | knowledge | 知识域 | | material | 物品域 |