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

knexup

v0.1.1-alpha

Published

A cli project starter/helper to get up and running with Knex.js projects.

Downloads

12

Readme

knexup

A cli project starter/helper to get up and running with Knex.js projects.

Installation

npm i -g knexup

# or 
yarn global add knexup

Usage

Start with knexup init

This should be the first thing when using knexup in an existing project.

This generates the knexup config file in the project. Open the config file and edit/confirm your preferred knex location (knexDir). This is where knex files and other featured helpers will be generated.

knexup bootstrap

Generates files and installs dependencies for working with knex.js in an existing project.

knexup table-init

Generates TableInit schema-creation helper objects for each table specified via the -t | --table flag. The "table-init" sub-command argument can be omitted also, in which case the arguments after that will serve as the tables input.

The examples below will generate a TableInit helper object for the "user" table.

knexup table-init user
knexup -t user

To bootstrap a new project, use knexup project <projectName>

Bootstrap a new project for working with knex.js.

  • Pass the -d, --databaseClient flag to specify which database client driver dependency to install. You can specify any client supported by Knex.
  • Pass the -p, --path flag to specify the path where the project should be created. If not specified, it defaults to the current directory in which the command is run.

knexup help

See help info

Options:
  -p, --path <char>             Path relative to project root.
  -t, --table [tables...]       Database table name(s).
  -d, --database-client <char>  The preferred database client (mysql|postgres|sqlite)
  -h, --help                    display help for command

Commands:
  init                          Initialize a project for Knex development. Generates TableInit migration helper object for table "create" migration. Also creates a knexup config file if it does not exist.
  project <projectName>         Generate a project based on knex.js
  bootstrap                     Generates files and installs dependencies for working with knex.js.
  table-init                    Generates table-init schema-creation helpers for each table specified via --table
  help [command]                display help for command

Dependencies Installed

The following runtime dependencies are installed by the knexup project command:

The following dev dependencies are auto-installed by the knexup project command:

The following runtime dependencies are installed by the knexup bootstrap command:

The following dev dependencies are installed by the knexup bootstrap command:

Changelogs

See changelogs here