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

jxl-cli

v0.0.11

Published

cli

Downloads

2

Readme

jxl-cli

用法

npm install -g jxl-cli

作用

jxl create <project-directory> 现提供 react 和 egg 两种模版,react 支持部署到配置文件里指定服务器的指定目录下; egg 将 react 和 eggjs 添加到一起。

命令行

Usage: jxl <command> [options]

Options:
  -v, --version  version
  -h, --help     display help for command

Commands:
  version        version
  help           output usage information
  create         create a new project from a template
  deploy         deploy project
  push           push project
  branch         checkout new branch
  merge          master merge branch
Usage:
  - jxl version
  - jxl help
  - jxl create [projectName]
  - jxl deploy
  - jxl push
  - jxl branch
  - jxl merge

Examples:
  $ jxl --help
  $ jxl --version

命令使用

jxl create [projectName]

可选择如下模版:

  • react template
  • react ts template
  • react library template
  • react library ts template
  • react ui template
  • react vite template
  • react vite ts template
  • egg template

jxl branch

创建新的分支,并同时修改 package.json 的 version 值,分支会分成三种类型(x.y.z):

  • patch: Bug 修复 - 增加 z
  • minor: 向下兼容的功能性新增 - 增加 y
  • major: 破坏性更新,不向下兼容 - 增加 x

jxl push

jxl push 会提交到当前正在工作的分支,如果没有,则默认提交到 master 上,建议先进行 git initgit remote 操作

jxl merge

执行 jxl push 操作后,会获取当前分支,并切换到 master 分支,merge 当前分支的代码

jxl deploy

根据 config/server.js 文件的配置进行部署,如果配置文件是:

module.exports = {
  projectName: '',
  template: 'react',
  buildPath: 'build',
  script: 'npm run build',
  host: '', // 服务器地址
  port: 22, // ssh 端口,一般是 22
  username: 'root', // 登录服务器用户名
  password: '', // 登录服务器密码
  serverPath: '/usr/src/my-app', // 文件上传的服务器地址
}

直接执行 jxl deploy 就可以,如果是下面这样:

module.exports = {
  pre: {
    projectName: '',
    template: 'react',
    buildPath: 'build',
    script: 'npm run build',
    host: '', // 服务器地址
    port: 22, // ssh 端口,一般是 22
    username: 'root', // 登录服务器用户名
    password: '', // 登录服务器密码
    serverPath: '/usr/src/my-app', // 文件上传的服务器地址
  },
  online: {
    projectName: '',
    template: 'react',
    buildPath: 'build',
    script: 'npm run build',
    host: '', // 服务器地址
    port: 22, // ssh 端口,一般是 22
    username: 'root', // 登录服务器用户名
    password: '', // 登录服务器密码
    serverPath: '/usr/src/my-app', // 文件上传的服务器地址
  },
}

则执行 jxl deploy prejxl deploy online 对应到相应的配置。