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

dbd-utility-scripts

v2.0.2

Published

Scripts for frequent development-build-deploy tasks

Downloads

1

Readme

About

Offers various utility scripts for frequently used develop-build-deploy(dbd) tasks.

✅ Polyglot 🥳🥳👏👏👏

Scripts

Builds on local.

cli options:

--idp : ✅ NodeJS. Install dependency packages if any to the buildDir. --deploy : deploy after build completion --buildEnvs : Specify comma separated build envs

cli options:

--idp : ✅ NodeJS. Install dependency packages if any to the buildDir. --deploy : deploy after build completion

Delete(clean) build directory.

cli options:

--dirPath=<dir-path> : (required) directory to clean --ignore : ignore patterns to delete in dirPath

Build for current codebase on another machine. (Host machine should be running deployment service)

cli options:

--downloadTo : specify download path for the artifact zip --noDownload : don't download save the artifact zip --deploy : deploy the artifact zip to configured deployment server (does'nt save artifact zip) --idp : Include dependency packages in the download zip. (If --deploy flag is set, this will add dependencyPackages pattern to ignoreDelete in deploy API) --buildEnvs : Specify comma separated build envs

Deploy build to the configured deployment host

cli options:

--env : Pass the deployment environment host. (default is default) --idp : Pass to include dependency packages in the build zip.               ℹ️This will remove dependencyPackages pattern to ignoreDelete in deploy API --buildPath : Specify build path. Supports directory & files paths, URLs (for any required configuration, configure it in deployment.artifactZipUrlConfig (axios configuration))

Zip buildDir

cli options:

--idp : Pass to include dependency packages in the zip.

Common CLI arguments:

--logStackTrace : pass to log the full stack trace if command breaks (Used for debug/information) purposes.

Configuration JSON (.scripts.config.json)

{
  // log total script time
  "profileTime": true,
  // set you deployment-service registerd app name
  "appName": "my-app",
  "deployment": {
    // ignoreDelete for deployment API
    "deploymentIgnoreDelete": [],
    // env name
    "dev": {
      "api": {
        // deployment API base URL
        "baseUrl": "http://localhost:8011"
      },
      // include files in zip for deployment (will add only if buildPath is a directory)
      "copyFiles": [
        "*.json",
        {
          "cwd": ".",
          "pattern": ".out/**"
        }
      ]
    },
    // additional configuration(axios) if --buildPath is URL in scripts-deploy
    "artifactZipUrlConfig": {
      "headers": {
        "app-name": "test-zz"
      }
    }
  },
  "build": {
    "buildInfo": {
      /*
       This must be set to true if you use this package provided builder(ex: esbuild) to build. If not then unset it.
       (Else the build-script command will freeze)  
       ✅Currently offers builder for NodeJs esbuild bundables
      */
      "usesDbdBuilder": false,
      /*
       override build commands
       If not set to null then this commands will be used to build on `scripts-build` command
       */
      "commands": [
        "npm i",
        // ... more of ur commands
        "npm i --include=dev",
        {
          // environment specific commands
          "env": "dev",
          // Append <cliArgs> like below to ur command if your command should take cliArgs passed to script-buildoh
          "command": "ts-node src/bin/build.js <cliArgs>"
        },
        {
          "env": "test",
          "command": "npm -v -- <cliArgs>"
        },
        {
          "command": "npm run build",
          // Will run for these environments
          "envs": [
            "win",
            "buildoh"
          ]
        },
        {
          "command": "source ~/.nvm/nvm.sh && nvm use 16 && npm run build",
          //command overridden by environments
          "override": [
            {
              "command": "npm -v",
              "envs": [
                "local"
              ]
            }
          ]
        },
      ],
      // ✅ For NodeJs esbuild bundables only
      "bundle": {
        // non-bundable dependencies (must be listed in dependencies in package.json)
        "bundledDependencies": "*",
        // esbuild options
        "esbuildConfig": {
          "entryPoints": [
            "test/index.js"
          ],
          "minify": true,
          "bundle": true,
          "metafile": false
        }
      }
    },
    "buildoh": {
      // additional file patterns to not send for build
      "codeBaseZipIgnore": [
        "node_modules/**"
      ],
      // additional file to include in the zip
      "copyFiles": [
        "*.json",
        {
          "cwd": ".",
          "pattern": ".out/**"
        }
      ],
      // file patterns to not delete when cleaning the codebase before unzipping new codebase
      "cleanCodeBaseIgnoreDelete": [
        "node_modules/**",
        "dist/bundle/node_modules/**"
      ],
      "api": {
        // build API base URL
        "baseUrl": "http://localhost:8011"
      },
      // override archive zip download location
      "zipDownloadTo": ".zip3332"
    },
    "buildPath": "./dist/lib",
    "dependencyPackagesFilePatterns": [
      "node_modules/**"
    ],
    // Files to not delete on clean-build command
    "cleanBuildIgnoreDelete": [
      "utils"
    ],
    // File patterns to copy to buildPath post build
    "copyFiles": [
      "*.json",
      {
        "cwd": ".",
        "pattern": [
          "test/**/*"
        ]
      }
    ]
  }
}