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

capsulejs

v1.3.2

Published

Easy deploy, rollback from git (bitbucket/github) to web server

Downloads

6

Readme

capsulejs

Easy deploy code from git (bitbucket/github) to you web server

Install

npm install -g capsulejs

Directory structure illustration

  var/
  └──web/
      ├───test1.com/            <--- Document root (simlink to /var/web/source_test1/2016-01-07_09-09-09)
      ├───test2.com/            <--- Document root (simlink to /varweb/source_test1/2016-03-07_09-09-09)
      ├───source_test1/
      │   ├───2016-01-02_09-00-00/
      │   ├───2016-01-05_09-09-09/
      │   └───2016-01-07_09-09-09/
      └───source_test2/
          └───2016-03-07_09-09-09/

Initial configuration

capsulejs init [--config <filename.json>]

** Capsulejs should generate capsule.json in current folder

default capsule.json

    {
        "prod" : {                  //Specify collection name
            "server": {
                "host": [],         // Ex. ["127.0.0.1", "127.0.0.1"]
                "user": "",
                "password": "",     // ssh login password when set private_key is blank
                "private_key": "",  // Private key path when set password is blank
                "location": "",     // Git clone to container folder Ex. "/var/web/source_test1" or "/var/web/source_test2"
                "simlink": "",      // Webserver document root each domain Ex. "/var/web/test1.com" or "/var/web/test2.com"
                "user_group": "",   // User group Ex: www-data:www-data
                "version_limit": 3  // Maximum file version on server
            },
            "repository": {
                "host": "",         //Git url Ex: ssh://[email protected]/foo/bar.git
                "branch": "master"
            },
            "command": {
                "post": {
                    "Command_name": ""  //Add unix command run after cloned; use {dir} will automatic replace with deployed directory
                    //Ex. "config": "mv {dir}/config/config_production.php {dir}/config/config.php" 
                    //From structure {dir} = /var/www/source_test1/2016-01-07_09-09-09 
                }
            }
        }
    }

Deploy from git

capsulejs deploy <collection name> [--ip <server ip> [--config <filename.json>]]

Example code

capsulejs deploy prod

Deploy options

  • --config : Specify config filename
  • --ip : Specify Server ip

Rollback to previous version

capsulejs rollback <collection name>

Example code

capsulejs rollback prod

Rollback options

  • --config : Specify config filename

License

MIT

Changelogs

###1.3.2

  • Specify config file with --config <filename.json>

1.3.1

  • Edit Readme
  • You can use command "capsulejs version" check installed version

1.3.0

  • Server ip config with array
  • Remove muti collaction deploy
  • Add limit verions store in server
  • Specify ip with --ip <server ip> when deploy

1.2.3

  • Deploy multi server

1.2.2

  • Support ssh passphrase

1.2.1

  • Support ssh private key

1.1.2

  • Fix depth for git clone

1.1.1

  • Fix delete dir error when rollback

1.1.0

  • Add post command execute after clone

1.0.2

  • Add document and to README.md

1.0.1

  • Start project and publish to npm server