Remove warning alert in watch bundle (#5714)

This commit is contained in:
Per Liedman 2017-08-15 11:39:53 +02:00 committed by GitHub
parent d54ec5f04a
commit fe3a340f1c

View File

@ -12,18 +12,9 @@ const rev = gitRev.short();
const version = require('../package.json').version + '+' + branch + '.' + rev;
const now = (new Date()).getTime();
const limit = now + 5 * 60 * 1000; // 5 minutes, in milliseconds
const warningCode = `
if ((new Date()).getTime() > ` + limit + `) {
var msg = "This rollupjs bundle is potentially old. Make sure you're running 'npm run-script watch' or 'yarn run watch'.";
alert(msg);
// throw new Error(msg);
}
const banner = `
/*
* Leaflet ` + version + `, a JS library for interactive maps. http://leafletjs.com
* Leaflet ${version}, a JS library for interactive maps. http://leafletjs.com
* (c) 2010-2016 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
@ -32,7 +23,7 @@ if ((new Date()).getTime() > ` + limit + `) {
export default {
format: 'umd',
moduleName: 'L',
banner: warningCode,
banner,
entry: 'src/Leaflet.js',
dest: 'dist/leaflet-src.js',
plugins: [