{"id":45071,"library":"gulp-version-append","title":"gulp-version-append","description":"Gulp plugin that replaces @version@ placeholders in static file references with the version from package.json (or a custom JSON file) for cache-busting. Version 0.2.0 is the latest stable release. Unlike hash-based tools like gulp-rev-append, this plugin reads no file contents, making it faster for projects where all assets are bundled and change with every version bump. Supports multiple file extensions (html, js, css, etc.) and three append modes: version string, timestamp, or short GUID. The plugin is not actively maintained and relies on a deprecated template pattern (?v=@version@) rather than modern content-hashing or file-renaming approaches.","status":"maintenance","version":"0.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/SkeLLLa/gulp-version-append","tags":["javascript","gulp","gulpplugin","gulp-rev-append","cache-busting","cache","revision","version","versioning"],"install":[{"cmd":"npm install gulp-version-append","lang":"bash","label":"npm"},{"cmd":"yarn add gulp-version-append","lang":"bash","label":"yarn"},{"cmd":"pnpm add gulp-version-append","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; the plugin is a Gulp plugin and requires Gulp to be installed.","package":"gulp","optional":false}],"imports":[{"note":"ESM default import; CommonJS require also works but is legacy.","wrong":"const versionAppend = require('gulp-version-append');","symbol":"default","correct":"import versionAppend from 'gulp-version-append'"},{"note":"Named import not available; use default import only.","wrong":"const { versionAppend } = require('gulp-version-append');","symbol":"versionAppend","correct":"import { versionAppend } from 'gulp-version-append'"},{"note":"The CommonJS module exports the function directly, not as a property.","wrong":"const versionAppend = require('gulp-version-append').default;","symbol":"require syntax","correct":"import versionAppend from 'gulp-version-append'"}],"quickstart":{"code":"import gulp from 'gulp';\nimport versionAppend from 'gulp-version-append';\nimport minifyHtml from 'gulp-minify-html';\n\ngulp.task('html', function() {\n  return gulp.src('src/*.html')\n    .pipe(versionAppend(['html', 'js', 'css']))\n    .pipe(minifyHtml())\n    .pipe(gulp.dest('dist'));\n});","lang":"javascript","description":"Registers a Gulp task that replaces @version@ placeholders in HTML files with the version from package.json, then minifies the HTML."},"warnings":[{"fix":"Ensure your HTML templates use the exact placeholder format: e.g., <script src=\"/js/app.js?v=@version@\"></script>","message":"Only replaces patterns matching `.<extension>?v=@version@` exactly. Does not handle other cache-busting query parameters.","severity":"gotcha","affected_versions":"*"},{"fix":"Use gulp v3 or wrap the task in a callback: gulp.task('html', (cb) => { ... cb(); })","message":"Plugin relies on gulp v3 style streams. Not compatible with gulp v4's async task resolution without wrapping.","severity":"deprecated","affected_versions":">=0.2.0"},{"fix":"Use `const versionAppend = require('gulp-version-append');` not `require('gulp-version-append').default`","message":"If using CommonJS require, the export is the function itself, not an object with a 'default' property.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Place version.json at the root of your project or provide an absolute path.","message":"The `versionFile` option path is relative to the project root (cwd), not the gulpfile.","severity":"gotcha","affected_versions":"*"},{"fix":"","message":"No breaking changes documented; the package is stable but unmaintained. Versions are unchanged since 0.2.0.","severity":"breaking","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.2.0':30 'activ':90 'append':4,45,78,118 'approach':111 'asset':59 'base':39 'bump':67 'bundl':61 'bust':28,121 'cach':27,120,122 'cache-bust':26,119 'chang':63 'content':51,105 'content-hash':104 'css':74 'custom':22 'deprec':96 'etc':75 'everi':65 'extens':71 'faster':54 'file':13,24,50,70,109 'file-renam':108 'guid':85 'gulp':2,5,43,113,116 'gulp-rev-append':42,115 'gulp-version-append':1 'gulpplugin':114 'hash':38,106 'hash-bas':37 'html':72 'javascript':112 'js':73 'json':23 'latest':33 'like':41 'maintain':91 'make':52 'mode':79 'modern':103 'multipl':69 'package.json':19 'pattern':98 'placehold':10 'plugin':6,47,87 'project':56 'rather':101 'read':48 'refer':14 'releas':35 'reli':93 'renam':110 'replac':8 'rev':44,117 'revis':123 'short':84 'stabl':34 'static':12 'string':81 'support':68 'templat':97 'three':77 'timestamp':82 'tool':40 'unlik':36 'v':99 'version':3,9,17,29,66,80,100,124,125","created_at":"2026-06-07T12:53:14.256221+00:00","updated_at":"2026-06-07T12:53:14.256221+00:00","problems":[{"fix":"Run `npm install gulp-version-append --save-dev` or ensure import is correct.","cause":"Missing installation or incorrect import path.","error":"Error: Cannot find module 'gulp-version-append'"},{"fix":"Use `const versionAppend = require('gulp-version-append');` directly.","cause":"CommonJS require incorrectly accessed .default property.","error":"TypeError: versionAppend is not a function"},{"fix":"Wrap the task: `gulp.task('html', function(cb) { ... cb(); })` or return the stream.","cause":"Using gulp v4 without proper async handling.","error":"gulp: Did you forget to signal async completion?"},{"fix":"Create a package.json with a 'version' field or specify `versionFile` option.","cause":"Missing package.json in project root.","error":"ENOENT: no such file or directory, open 'package.json'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/SkeLLLa/gulp-version-append","github":"https://github.com/SkeLLLa/gulp-version-append","docs":null,"changelog":null,"pypi":null,"npm":"gulp-version-append","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}