Package Exports
- hops
- hops/lib/create-app
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)
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 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.
$ yarn global add hops@next
# OR npm install --global hops@nextOr install it locally in an already existing Hops application.
$ yarn add hops@next
# OR npm install --save hops@nextUsage
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:
--verbose- to increase the verbosity of the output for debugging purposes--npm- to force usage ofnpminstead ofyarneven if yarn is available--template- to specify a different template for the intial structure. available templates:
Then cd into my-new-hops-project and execute hops --help again to see a list of supported commands.
Available Commands
hops build(provided byhops-preset-defaults) - initiates a project build to generate browser and server JS bundleshops develop(provided byhops-preset-defaults) - starts the webpack development server with hot code reloading for fast local iterationshops serve(provided byhops-preset-defaults) - starts a production Node.js Express server using the generated JS bundle fromhops buildhops start- if NODE_ENV is set to production, this runshops buildandhops serve. Otherwisehops developis executed.
All commands accept additional arguments:
--production/-p- equivalent to settingNODE_ENVtoproduction--static/-s- to generate static HTML app shells for all configured hops locations.--clean/-c- defaults totrue, removes the build directory before initiating a build (n/a forhops serve)