Blame view

src/main/resources/leafletmap/Leaflet.markercluster-1.4.1/build/rollup-config.js 1.05 KB
9e952e84e   lsagona   add message clust...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  
  // Config file for running Rollup in "normal" mode (non-watch)
  
  import rollupGitVersion from 'rollup-plugin-git-version'
  import json from 'rollup-plugin-json'
  
  import gitRev from 'git-rev-sync'
  
  
  let version = require('../package.json').version;
  let release;
  
  // Skip the git branch+rev in the banner when doing a release build
  if (process.env.NODE_ENV === 'release') {
  	release = true;
  } else {
  	release = false;
  	const branch = gitRev.branch();
  	const rev = gitRev.short();
  	version += '+' + branch + '.' + rev;
  }
  
  const banner = `/*
   * Leaflet.markercluster ` + version + `,
   * Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
   * https://github.com/Leaflet/Leaflet.markercluster
   * (c) 2012-2017, Dave Leaver, smartrak
   */`;
  
  export default {
  	format: 'umd',
  	moduleName: 'Leaflet.markercluster',
  	banner: banner,
  	entry: 'src/index.js',
  	dest: 'dist/leaflet.markercluster-src.js',
  	plugins: [
  		release ? json() : rollupGitVersion(),
  	],
  	sourceMap: true,
  	legacy: true // Needed to create files loadable by IE8
  };