Skip to content

Commit

Permalink
Include link to license in compiled bundle (#6975)
Browse files Browse the repository at this point in the history
  • Loading branch information
anandthakker committed Jul 16, 2018
1 parent af42b58 commit e1af72c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import fs from 'fs';
import sourcemaps from 'rollup-plugin-sourcemaps';
import {plugins} from './build/rollup_plugins';

const version = JSON.parse(fs.readFileSync('package.json')).version;

const production = process.env.BUILD === 'production';
const outputFile = production ? 'dist/mapbox-gl.js' : 'dist/mapbox-gl-dev.js';

Expand Down Expand Up @@ -35,7 +37,8 @@ const config = [{
format: 'umd',
sourcemap: production ? true : 'inline',
indent: false,
intro: fs.readFileSync(require.resolve('./rollup/bundle_prelude.js'), 'utf8')
intro: fs.readFileSync(require.resolve('./rollup/bundle_prelude.js'), 'utf8'),
banner: `/* Mapbox GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/mapbox/mapbox-gl-js/blob/v${version}/LICENSE.txt */`
},
treeshake: false,
plugins: [
Expand Down

0 comments on commit e1af72c

Please sign in to comment.