0.2.0 • Published 4 years ago

@drpgroup/crunch v0.2.0

Weekly downloads
2
License
MIT
Repository
-
Last release
4 years ago

@drpgroup/crunch

Opinionated batteries-included webpack-powered bundler for our Laravel + React projects

Usage

npm install @drpgroup/crunch
npx crunch build
npx crunch dev

crunch build

Options

-e, --entry

Default: "./resources/js/app.js"

The entrypoint for the application. This currently only supports a singular entrypoint. WIP.

--noHash

Supplying this option will disable the automatic filename hashing. There isn't really a good reason to turn this on unless you want to control the hashing yourself via a custom system.

-o, --outDir

Default: "./public/dist"

The directory to place all resulting built assets into. This will include JS, CSS, images and any other statically built assets. This should be a directory that is statically-serving these resources.

This probably won't need to be changed unless you wish to place your built assets elsewhere.

-p, --publicPath

Default: "/dist/"

The path to use as the content public path base for all static assets. This is closely related to the outDir option and will be the relative folder path prefixed to any statically loaded assets.

As a general rule of thumb, this will only need to change if outDir changes.

-m, --manifestPath

Default: "./storage/app/crunch-manifest.json"

Where the crunch manifest file should be saved (including its filename).

There is no reason for this to change unless you wish to save it elsewhere, however the Laravel package config will also need to change to point to the custom filepath.