JSPM

hops

10.2.0-rc.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 274
  • Score
    100M100P100Q88429F
  • License MIT

CLI tool to create, build and run Hops applications

Package Exports

  • hops

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hops) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Hops (CLI)

npm

This package provides a binary (hops) that can be used to create and control Hops applications.

In order to create a new Hops application, it is recommended to install this package either globally (npm install --global hops or yarn global add hops and then hops init my-hops-project) or to use npx (npx hops init my-hops-project).

When the binary is executed outside of a Hops project, it will only expose one command init - which can be used to create a new Hops application based on a pre-defined template.

When this binary is executed inside a Hops application it exposes all commands that are provided by the installed Hops dependencies.

Installation

Install it globally to create a new Hops application.

Or install it locally in an already existing Hops application.

Install it globally via npm:

npm install --global hops

Or yarn

yarn global add hops

Or use npx:

npx hops init ...

Install it locally to an existing Hops application:

npm install --save hops

Or:

yarn add hops

Usage

Bootstrapping a Project

hops init my-new-hops-project [--verbose] [--npm] [--template hops-template-*]

This will create a very basic hops example project that is ready to go.

The following arguments are optional:

Then cd into my-new-hops-project and execute hops --help again to see a list of supported commands.

Available Commands

  • hops build (provided by hops-build) - initiates a project build to generate browser and server JS bundles
  • hops develop (provided by hops-build) - starts the webpack development server with hot code reloading for fast local iterations
  • hops serve (provided by hops-express) - starts a production Node.js Express server using the generated JS bundle from hops build
  • hops start - if NODE_ENV is set to production, this runs hops build and hops serve. Otherwise hops develop is executed.

All commands accept additional arguments:

  • --production / -p - equivalent to setting NODE_ENV to production
  • --static / -s - to generate static HTML app shells for all configured hops locations.
  • --clean / -c - defaults to true, removes the build directory before initiating a build (n/a for hops serve)

hops only lists commands that are made available by other installed hops packages.

So for example hops build and hops develop are only available if hops-build is installed as a dependency in your project (hops-template-react includes it by default).

The command hops serve is only available if hops-express is installed as a dependency in your project (also included in the default react template).

And the command hops start is only available if hops-build and hops-express are installed as dependencies. To disable rebuilds in production mode, you must simply disable cleaning: hops start -p --clean=false.

Configuration

hops is being configured through hops-config.