10.4.6 • Published 6 years ago

hops-build v10.4.6

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Hops Build

npm

hops-build is a wrapper around webpack and hops-build-config which exports functions to execute a single build or start a webpack-dev-server.

API

runBuild(options, callback)

runBuild() can be used to execute a webpack build.\ If being used with the static option set to true it will generate html files for all locations configured in your package.json.\ If being used without the static option it will run the webpack build for the buildConfig and nodeConfig (see hops-build-config for more details).

runBuild() supports the following options:

FieldTypeDefaultDescription
staticbooleanfalseWhether to statically build app shells for all locations
cleanbooleantrueWhether to clean the build and cache directories before starting the build

The callback is being called after the build has finished and can be used to schedule further work.

runServer(options, callback)

runServer() can be used to start a webpack-dev-server. It will take the developConfig with its watchConfig (see hops-build-config for more details) and start a webpack-dev-server.

runServer() supports the following options:

FieldTypeDefaultDescription
cleanbooleantrueWhether to clean the build and cache directories before starting the server

The callback is being called after the server has started and can be used to schedule further work.

Target Audience

If you want to programmatically start a webpack build then you should use this module.

Example

build.js

var hopsBuild = require('hops-build');

hopsBuild.runBuild({}, function() {
  console.log('the build has finished');
});
10.4.6

6 years ago

10.4.4

6 years ago

10.4.3

6 years ago

10.4.2

6 years ago

10.4.1

6 years ago

10.4.0

6 years ago

10.3.0

6 years ago

10.3.0-rc.3

6 years ago

10.3.0-rc.2

6 years ago

10.2.1

6 years ago

10.3.0-rc.1

6 years ago

10.3.0-rc.0

6 years ago

10.2.0

6 years ago

10.2.0-rc.5

6 years ago

10.2.0-rc.3

6 years ago

10.2.0-rc.2

6 years ago

10.2.0-rc.1

6 years ago

10.2.0-rc.0

6 years ago

10.1.0

6 years ago

10.0.2

6 years ago

10.0.1

6 years ago

10.0.0

6 years ago

10.0.0-rc.4

6 years ago

10.0.0-rc.3

6 years ago

10.0.0-rc.2

6 years ago

10.0.0-rc.1

6 years ago

10.0.0-rc.0

6 years ago

9.8.0

6 years ago

9.7.0

6 years ago

9.6.0

6 years ago

9.5.0

6 years ago

9.4.2

6 years ago

9.4.1

6 years ago

9.4.0

6 years ago

9.3.2

6 years ago

9.3.1

6 years ago

9.3.0

6 years ago

9.1.1

6 years ago

9.0.1

6 years ago

9.0.0

6 years ago

8.0.0

6 years ago

7.4.1

7 years ago

7.4.0

7 years ago

7.3.0

7 years ago

7.2.0

7 years ago

7.1.0

7 years ago

7.0.0

7 years ago

7.0.0-3

7 years ago

7.0.0-2

7 years ago

7.0.0-0

7 years ago