Sha256: 7490a1058afcc76b2fac47085e592139024424586875947111bd20b6ac479dac

Contents?: true

Size: 571 Bytes

Versions: 8

Compression:

Stored size: 571 Bytes

Contents

const fs = require('fs');
const pkg = require('./package.json');
const filename = 'anchor.min.js';
const script = fs.readFileSync(filename);
const padStart = str => ('0' + str).slice(-2)
const dateObj = new Date;
const date = `${dateObj.getFullYear()}-${padStart(dateObj.getMonth() + 1)}-${padStart(dateObj.getDate())}`;
const banner = `/**
 * AnchorJS - v${pkg.version} - ${date}
 * ${pkg.homepage}
 * Copyright (c) ${dateObj.getFullYear()} Bryan Braun; Licensed ${pkg.license}
 */
`;

if (script.slice(0, 3) != '/**') {
  fs.writeFileSync(filename, banner + script);
}

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
ilog-0.4.1 node_modules/anchor-js/banner.js
ilog-0.4.0 node_modules/anchor-js/banner.js
ilog-0.3.3 node_modules/anchor-js/banner.js
jekyll-theme-mozg-0.1.0 assets/javascript/anchor-js/banner.js
jekyll-theme-primer-0.5.2 assets/javascript/anchor-js/banner.js
jekyll-theme-primer-0.5.1 assets/javascript/anchor-js/banner.js
jekyll-theme-primer-0.5.0 assets/javascript/anchor-js/banner.js
jekyll-theme-primer-0.4.0 assets/javascript/anchor-js/banner.js