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

@nebulae-cli/deploy

v0.1.8

Published

Command line tools for deploying

Downloads

2

Readme

@nebulae-cli/deploy

Command line tools for deploying

Features

  • 🪄 Support multiple configuration file formats, such as json, yaml, js.

  • 🚩 Supports configuring multiple tasks.

  • ⚡ Supports individual step execution, such as connect, clean, backup, upload.

  • 🌍 Support global configuration

Translations

简体中文

Installation

  • Global install
npm install @nebulae-cli/deploy -g

test deploy --version, If the version number is successfully displayed, it means the installation is successful

or

  • Project install
npm install @nebulae-cli/deploy -D

If you did not install globally, the command should be invoked using ./node_modules/.bin/deploy --version

Usage

How to use command line tools?

1. Generate deploy config file

deploy init

usage:

Usage: deploy init|generate [options]

init(generate) deploy config file

Options:
  -t, --type <type>      file type: "json" | "yaml" | "javascript" (default: "javascript")
  -m, --module <module>  javascript module type: "commonjs" | "cjs" | "esm" | "mjs" (default: "cjs")
  -g, --global           generate global config file
  -h, --help             display help for command

2. Modify the configuration file

/** @type {import("@nebulae-cli/deploy").ConfigOptions} */
module.exports = {
  host: 'xxx.xx.xxx.x',
  port: 22,
  username: 'server_ssh_name',
  // logger: true, // Whether to enable log output
  // logFilePath: 'deploy.log',
  // password: '',
  // privateKey: '',
  // autoBackup: true,
  // autoClean: false, // If the task attribute does not exist, it will take effect
  tasks: [
    {
      name: 'task name',
      disabled: false,
      target: 'your/dist/path',
      remoteDir: '/your/server/path',
      autoBackup: true,
      autoClean: false, // All attributes support upward merging. For example, configuration common to all tasks can be configured on the root property
      // backupDir: '',
      // deployedCommands: [], // Remote commands executed after deployment, such as ['cd/var/applications', 'java - jar xxx. jar'], will use && to merge multiple commands
    },
  ],
};

3. Test the connection

deploy connect

usage:

Usage: deploy connect [options]

test the connection to server

Options:
  -h, --host <host>              ssh server address
  -p, --port <port>              ssh server port (default: "22")
  -u, --username <username>      ssh server username
  -w, --password <password>      ssh server password
  -k, --privateKey <privateKey>  ssh private key path
  -c, --config <config>          config file path
  --help                         display help for command

4. Deploy

deploy

useage:

Usage: deploy [options] [command]

CLI for deploy project to server

Options:
  -V, --version            output the version number
  -c, --config             config file path
  -h, --help               display help for command

Commands:
  init|generate [options]  init(generate) deploy config file
  connect [options]        test the connection to server
  backup [options]         backup remote project from server to local
  clean [options]          clean server directory
  upload [options]         upload local project dist to ssh server

you can add scripts to package.json

  "scripts": {
    "deploy": "deploy",
  },

then, use npm run deploy

5. Other commands

5.1 view config

deploy view config

useage:

Usage: deploy view [options] <config>

view deploy config file info

Options:
  -c, --config <config>  config file path
  -h, --help             display help for command

5.2 open repository

deploy repository
# or
deploy repo

useage:

Usage: deploy repository|repo [options]

open repository

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