@siteone/builder-core

0.12.2 • Public • Published

@siteone/builder-core

BLDR's core configuration builder.

$ npm install --save-dev @siteone/builder-core

API

core(src, opts)

Returns: WebpackCompiler

Returns an instance of Webpack.

Attaches a BLDR_CONFIG key on the WebpackCompiler directly, containing the parsed bldr.config.js file, if any.

Will also mutate opts will additional keys:

  • src – the resolved src value
    Equivalent to WebpackCompiler.options.context value.

  • webpack - the require('webpack') instance in use
    For reuse / convenience elsewhere; eg, Plugins.

src

Type: String
Default: 'src'

The name of your "source" directory within the opts.cwd. This will be set as the context for Webpack.

Important: Reverts to the opts.cwd if the directory could not be found.

opts.cwd

Type: String
Default: '.'

The current working directory.

opts.dest

Type: String
Default: 'build'

The name of the output directory.

opts.analyze

Type: Boolean
Default: false

When this and opts.production are both true, attaches and starts Webpack Bundle Analyzer for bundle inspection.

opts.production

Type: Boolean
Default: false

If building configuration for production.

opts.template

Type: String

The name or path to a custom template for HTML Webpack Plugin.

If nothing is provided, then BLDR will look for a index.{html,hbs,ejs} file within your src directory.

If an index.(html|hbs|ejs) couldn't be found, then the internal template will be used.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.12.22latest
0.10.0-rc.00next

Version History

VersionDownloads (Last 7 Days)Published
0.12.22
0.12.10
0.12.00
0.11.40
0.11.30
0.11.20
0.11.10
0.11.00
0.10.0-rc.00
0.9.10
0.9.00
0.8.51
0.8.40
0.8.30
0.8.20
0.8.10
0.8.00
0.7.90
0.7.80
0.7.70
0.7.60
0.7.50
0.7.40
0.7.30
0.7.10
0.7.00
0.6.50
0.6.00
0.5.00
0.4.140
0.4.130
0.4.120
0.4.110
0.4.90
0.4.81
0.4.70
0.4.60
0.4.30
0.4.20
0.4.10
0.4.01
0.3.10
0.3.00
0.2.40
0.2.20
0.2.10
0.2.00
0.1.90
0.1.80
0.1.60
0.1.51
0.1.40
0.1.4-alpha.00
0.1.3-alpha.00
0.1.10
0.1.0-alpha.00
0.0.330
0.0.320
0.0.311
0.0.300
0.0.290
0.0.280
0.0.270
0.0.260
0.0.250
0.0.240
0.0.230
0.0.220
0.0.210
0.0.21-alpha.01
0.0.20-alpha.10
0.0.20-alpha.00
0.0.190
0.0.180
0.0.170
0.0.160
0.0.150
0.0.140
0.0.130
0.0.120
0.0.110
0.0.100
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40

Package Sidebar

Install

npm i @siteone/builder-core

Weekly Downloads

8

Version

0.12.2

License

MIT

Unpacked Size

24.6 kB

Total Files

10

Last publish

Collaborators

  • supermartin
  • siteonecz
  • hlavo-siteone
  • viktorbezdek
  • jiri.cerhan