1.0.6 • Published 10 months ago

@tacoherd/parcel-namer-commit-hash v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

parcel-namer-commit-hash

A Parcel plugin for including the Git commit hash in bundle filenames.

Host requirements:

  • Node 18+
  • Git

Add to Project

npm install --save-dev @tacoherd/parcel-namer-commit-hash

Enable Plugin

Enable the plugin in your .parcelrc file, e.g.:

{
  "namers": ["@tacoherd/parcel-namer-commit-hash", "..."]
}

Plugin Configuration

There are currently two options to configure the plugin:

Specify a template to rename all files via package.json#@tacoherd/parcel-namer-commit-hash.template, e.g.:

{
  "@tacoherd/parcel-namer-commit-hash": {
    "template": "bundle.{commit-hash}.{content-hash}.min.js"
  }
}

Specify templates by bundle type via package.json#@tacoherd/parcel-namer-commit-hash.templates, e.g.:

{
  "@tacoherd/parcel-namer-commit-hash": {
    "templates": {
      "js": "bundle.{commit-hash}.{content-hash}.min.js"
    }
  }
}

Templates

Templates are how you'd like files to be named. You can specify placeholders as {placeholder-name}. The following placeholders are available:

Placeholder nameDescription
commit-hashThe git commit hash upon which the bundle is based.
If the working directory is not clean, returns "dirty".
content-hashThe content hash generated by Parcel.
1.0.6

10 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago