@zerva/bin

0.62.0 • Public • Published

🌱 @zerva/bin

This is a side project of Zerva

Command line tool to simplify work with Zerva. For debug and production.

In your package.json you might want to add these lines:

{
  "scripts": {
    "start": "zerva",
    "build": "zerva build",
    "serve": "node dist/main.cjs"
  }
}

Zerva uses esbuild to create both the development server code and the production code. You can take advantage of conditional building using defines. This can be used to have code that avoids certain imports or otherwise unneed stuff in production mode. I.e. in your code you can do stuff like this:

if (ZERVA_DEVELEPMENT) {
  /* do something */
}

Valid defines are:

  • ZERVA_DEVELOPMENT is true when started as zerva
  • ZERVA_PRODUCTION is true when started as zerva build

For better compatibility the defines can also be accessed as process.env.ZERVA_DEVELOPMENT and process.env.ZERVA_PRODUCTION.

npm install -D @zerva/bin @zerva/core @zerva/http

/@zerva/bin/

    Package Sidebar

    Install

    npm i @zerva/bin

    Weekly Downloads

    11

    Version

    0.62.0

    License

    MIT

    Unpacked Size

    558 kB

    Total Files

    5

    Last publish

    Collaborators

    • zerva