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

@wjh666/ssh

v0.0.13

Published

### 安装 npm i @wjh666/ssh -g

Downloads

12

Readme

node 服务器操作

安装

npm i @wjh666/ssh -g

已有命令

w-ssh upFile

w-ssh upvrpc 完整路径

w-ssh createFile 名称 路径(可不填,使用模版中的outUrl)

w-ssh copyFile 文档后续补

upFile

上传文件到服务器,用于前端项目部署,本地打包后读取配置文件,根据配置文件信息,上传到服务器 项目根目录添加配置文件

文件命名格式:up-file.js up-file.**.js

文件内容事例

module.exports = {
  host: '', // 服务器地址
  port: '', // 端口
  username: '', // 帐号
  password: '', // 密码
  localDir: './dist', // 要上传的文件地址(相对路径)
  serverDir: '/data/demo01' // 要上传到服务器的目录
}

upvrpc

项目需求,需要在几百个文件夹中替换文件,不想手动写,写个脚本,慎用

完整路径 要替换文件的目录

createFile

根据本地模版生成文件/文件夹

小程序组件使用了官方的框架,创建组件与页面经常无法使用小程序的一键生成

react项目中组件创建一般需要定义 tsx文件,less文件,以及引入与导出。ts类型声明

所以写了这个组件

文件demo

module.exports = {
  // 模版位置
  templateBase: './a.html',
  // 输出文件夹位置 如果有第2个参数则替换
  outUrl: './page',
  // 文件名称转换
  fileName: (e: '第一个参数') => {
    return e
  },
  // 模版中的变量替换
  variable: {
    a: 1,
    b: (e: '第一个参数') => {
      return e + 'abc'
    }
  }
}

文件夹demo

module.exports = {
  // 模版文件夹位置
  templateBase: './reactTemplate',
  outUrl: './page',
  // 文件夹名字处理
  filesName: (e: '第一个参数') => {
    return e
  },
  fileName: (e) => {
    return 'index'
  },
  variable: {
    a: 1,
    b: (e) => {
      return e + 'abc'
    }
  }
}