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

@slan-health/cli

v0.0.4

Published

slan-health cli

Downloads

3

Readme

Slan CLI

简介

该文档阐述了@slan-helth/cli 脚手架的功能需求。 Slan CLI 是一个能够提高前端开发效率,快速创建我们的前端项目。

安装

可以使用命令安装这个包:

npm install -g @slan-health/cli
# OR
yarn global add @slan-health/cli

安装之后,你就可以在命令行中访问 slan 命令。你可以通过简单运行 slan,看看是否展示出了一份所有可用命令的帮助信息,来验证它是否安装成功。

你还可以用slan --version或者slan -V这两个命令来检查其版本信息: Alt text

升级

如需升级全局的 SLAN CLI 包,请运行:

npm update -g @slan-health/cli
# 或者
yarn global upgrade --latest @slan-health/cli

创建一个项目

slan create

运行一下命令来创建一个项目:

slan create demo

项目名称必传,否则你将会被提示: Alt text

你会被提示选取一个 项目模版,后台管理系统小程序或者h5模版,默认会选择后台管理系统。 Alt text

选择模版之后,脚手架会帮你自动完成下载和安装,看到如下界面,说明你的项目已经创建成功了。 Alt text

之后进入项目目录,启动项目。

cd demo
yarn run dev

发布

slan publish

publish 目前实现了以下功能:

  • 自动化提交准备和代码仓库的初始化
  • 代码自动化提交
  • 打 tag 并且合并到 master

发布之前,你需要准备一个访问令牌token,以便于你可以顺利的访问 Gitlab API,创建远程仓库,获取个人和组织信息等。你可以在 Gitlab 个人设置中的访问令牌 token生成。

首次publish,你需要设置--refreshServer--refreshToken--refreshOwner去初始化一些仓库信息。

slan publish --refreshServer --refreshToken --refreshOwner

之后的每次发布,只需执行slan publish。之前的仓库信息已被存到缓存文件中,无需重复设置,除非你的仓库地址改了,你需要重新设置。

--refreshServer

是否强制刷新远程仓库, 你可以选择想要托管的仓库类型,目前脚手架已经实现的 Gitlab、Github、Gitee 的接入。 Alt text

--refreshToken

是否强制刷新远程仓库token,选择了仓库,去生成对应的 token。

--refreshOwner

是否强制刷新远程仓库类型, 可以选择个人或者组织。 Alt text

若选择个人,项目创建在你的个人目录下;若你选择了组织,项目将被创建在对应的组织下,如front-end-template组织。 Alt text

我们的版本规范是major/minor/patch,发布时,你可以选择版本号,默认 path 小版本,当前你也可以自定义版本号。 Alt text incVersion