@bringhub/webpack-content-versioning
version file content
Last updated 3 years ago by itsleeowen .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @bringhub/webpack-content-versioning 
SYNC missed versions from official npm registry.

Glob the pattern/s (comma separated), parse the content, add to webpack compilation assets, and prefix compilation hash to webpack entries.

//webpack.config.js
entry: {
  "app.js": "src/app.js",
  "app.css": "src/app.css",
},
plugins: [
  new ContentVersioning({
    src: "./src",        
    pattern: "**/*.html",
  }),
],
<!-- src/index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
      <meta name="version" content="[commit]">
      <title>Advertiser | Bringhub</title>
      <link rel="stylesheet"
            type="text/css"
            href="[hash].app.css">
      <script defer
              src="[hash].app.js"></script>
</head>
</html>

src/app.js is output to dist/j281ajdhk12.app.js

src/index.html output to dist/index.html with the rendered hashes and git commit version

Current Tags

  • 0.0.8                                ...           latest (3 years ago)

8 Versions

  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 8
Last Month 16
Dependencies (4)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |