Skip to content

Commit

Permalink
Polyfills don't need a header
Browse files Browse the repository at this point in the history
  • Loading branch information
thednp committed Jun 4, 2020
1 parent dbcb485 commit 328a8b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
7 changes: 1 addition & 6 deletions dist/polyfill.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
/*!
* Native JavaScript for Bootstrap Polyfill v3.0.5 (https://thednp.github.io/bootstrap.native/)
* Copyright 2015-2020 © dnp_theme
* Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE)
*/
"use strict";
"use strict";
if (!Array.from) {
Array.from = (function () {
var toStr = Object.prototype.toString;
Expand Down
1 change: 0 additions & 1 deletion dist/polyfill.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,18 @@ import cleanup from 'rollup-plugin-cleanup'
import * as pkg from "./package.json";

// set headers
const POLYFILL = process.env.POLYFILL
const POLYFILL = process.env.POLYFILL === 'true'
const year = (new Date).getFullYear()
const banner = POLYFILL
?`/*!
* Native JavaScript for Bootstrap Polyfill v${pkg.version} (${pkg.homepage})
* Copyright 2015-${year} © ${pkg.author}
* Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE)
*/
"use strict";`
?'"use strict";'
:`/*!
* Native JavaScript for Bootstrap v${pkg.version} (${pkg.homepage})
* Copyright 2015-${year} © ${pkg.author}
* Licensed under MIT (https://github.com/thednp/bootstrap.native/blob/master/LICENSE)
*/`

const miniBanner = POLYFILL
?`// Native JavaScript for Bootstrap Polyfill v${pkg.version} | ${year} © ${pkg.author} | ${pkg.license}-License
"use strict";`
? banner
:`// Native JavaScript for Bootstrap v${pkg.version} | ${year} © ${pkg.author} | ${pkg.license}-License`

// set config
Expand Down

0 comments on commit 328a8b5

Please sign in to comment.