var Version = require("node-version-assets");
var versionInstance = new Version({
assets: ['public/js/modules/main.js'],
grepFiles: ['public/index.html'],
keepOriginalAndOldVersions: true,
requireJs: true
});
versionInstance.run();
then executing node config.js will replace also the main part of data-main attribute in HTML document's script tag loading RequireJS. The output is:
Given you have the following HTML document
and the following config for
node-version-assets
:then executing
node config.js
will replace also themain
part ofdata-main
attribute in HTML document'sscript
tag loading RequireJS. The output is: