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

@watone/wt-cli

v1.2.14

Published

watone tools

Downloads

96

Readme

WATONE 命令行工具

前言

  • 为了快速帮助开发命令行工具,本文的教程将用于学习各种命令行工具的使用。
  • 请按照本教程使用,会极大提升工作效率。
  • 该工具是集成了下载模版,npm 换源 ,IP查询等各种好用的小工具

安装并使用

npm install @watone/wt-cli --global
# OR
yarn install @watone/wt-cli --global
# OR
pnpm install @watone/wt-cli --global

更新命令行工具

npm update @watone/wt-cli --global

命令预览

watone -h

命令说明

  • 当你安装watone之后,你可以在命令行环境中输入watone help来查看你所使用的命令的相关说明。

  • 注意watone是一个顶级命令,同时创建的顶级命令还有i,http,b,v,当你直接使用顶级命令时,可以不用包含watone前缀,值得说明的是i,http,b,v都可以在watone下使用,等同与watone i,watone http,watone b,watone v

i => watone i
http => watone http
b => watone b
v => watone v

watone 命令

watone -v 获取版本号

# 版本号
watone -v
# OR
watone --version

watone -h 查看帮助

# 查看帮助
watone -h
# OR
watone --help

watone init 快速脚手架

此命令会让你快速生成一个项目,目前内置四个模版

watone init
  • 选择后,输入内容会在当前文件夹下生成对应模版

watone s 关键字搜索

# 搜索问题,并在浏览器打开
watone s
# OR
watone serach
使用方法:
      watone s [搜索的关键字]

可选参数
     -b, --baidu   使用百度搜索
     -g, --google  使用谷歌搜索
     -s, --sougou  使用搜狗搜索
     -t, --github  使用github搜索

watone ip 获取本机ip

watone ip
使用方法:
      watone ip

watone o 打开url

# 会使用默认浏览器打开url
watone o
# OR
watone open
使用方法:
      watone o [url链接]

watone t 翻译服务

此命令需要连接到互联网

# 需要翻译的单词或关键词
watone t
# OR
watone translation
使用方法:
      watone t [需要翻译的单词或关键词]
例如:(翻译你好)
      watone t 你好

watone a 天气服务

此命令需要连接到互联网

# 会查询当前地区天气服务
watone a
# OR
watone weather
使用方法:
      watone a [地区]
例如:(查询郑州的天气)
      watone a zhengzhou

watone npm 换源服务

watone npm
  • 1. 选择哪个命令要换源

  • 2. 选择要换的是哪个源(推荐使用xkloveme对应淘宝源)

# 列出现在的源情况
watone npm ls

watone app 华通云看板

此命令会启动一个应用,展示项目发布信息

watone app

http 命令说明

# 会在当前目录启动一个http服务,并在浏览器打开
http
# OR
watone h
# OR
watone http
使用方法:
      watone h
可选参数
     -p, --port   指定端口,默认5282
     -o, --open   是否打开浏览器,默认打开
     -u, --url    启动目录,默认当前目录

v 命令说明

当在所在项目时,v命令会去寻找dev命令执行 当后面跟参数时 biv 命令并没有本质区别 和pnpmyarnnpm一样,当没有安装pnpm时,启动顺序为pnpm>yarn>npm

v
# OR
watone v
# OR
watone dev
使用方法:
      watone v [npm的启动命令]

b 命令说明

当在所在项目时,b命令会去寻找build命令执行 当后面跟参数时 biv 命令并没有本质区别 和pnpmyarnnpm一样,当没有安装pnpm时,启动顺序为pnpm>yarn>npm

b
# OR
watone b
# OR
watone build
使用方法:
      watone b [npm的启动命令]

i 命令说明

当在所在项目时,i命令会去安装依赖同pnpm i 当后面跟参数时 biv 命令并没有本质区别 和pnpmyarnnpm一样,当没有安装pnpm时,启动顺序为pnpm>yarn>npm

i
# OR
watone i
# OR
watone install
使用方法:
      watone i [npm的启动命令]

问题汇总

1.问: 当我安装之后,watone -v提示我 watone : 无法加载文件 C:\Users\lenovo\AppData\Roaming\npm\watone.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。

解决办法:

  • 1.以管理员身份运行power shell (备注:右键win标,选择 “Windows PowerShell(管理员)”打开即可)
  • 2.输入 set-ExecutionPolicy RemoteSigned 回车
  • 3.输入 A 或者 Y 回车 成功后重新尝试watone -v就可以了