1 Star 1 Fork 1

Scott / maptalk.three

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
rollup.config.js 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
deyihu 提交于 2019-09-30 15:25 . add extrudeline, close #44 (#46)
const resolve = require('rollup-plugin-node-resolve');
const babel = require('rollup-plugin-babel');
const commonjs = require('rollup-plugin-commonjs');
const uglify = require('rollup-plugin-uglify').uglify;
const pkg = require('./package.json');
const banner = `/*!\n * ${pkg.name} v${pkg.version}\n * LICENSE : ${pkg.license}\n * (c) 2016-${new Date().getFullYear()} maptalks.org\n */`;
let outro = pkg.name + ' v' + pkg.version;
if (pkg.peerDependencies && pkg.peerDependencies['maptalks']) {
outro += `, requires maptalks@${pkg.peerDependencies.maptalks}.`;
}
outro = `typeof console !== 'undefined' && console.log('${outro}');`;
const basePlugins = [
resolve({
module : true,
jsnext : true,
main : true
}),
commonjs(),
babel({
// exclude: 'node_modules/**'
})
];
module.exports = [
{
input: 'index.js',
plugins: basePlugins.concat([uglify()]),
external : ['maptalks', 'three'],
output: {
'sourcemap': false,
'format': 'umd',
'name': 'maptalks',
'banner': banner,
'outro' : outro,
'extend' : true,
'globals' : {
'maptalks' : 'maptalks',
'THREE' : 'three'
},
'file': 'dist/maptalks.three.min.js'
}
},
{
input: 'index.js',
plugins: basePlugins,
external : ['maptalks', 'three'],
output: {
'sourcemap': false,
'format': 'umd',
'name': 'maptalks',
'banner': banner,
'outro' : outro,
'extend' : true,
'globals' : {
'maptalks' : 'maptalks',
'THREE' : 'three'
},
'file': 'dist/maptalks.three.js'
}
},
{
input: 'index.js',
plugins: basePlugins,
external : ['maptalks', 'three'],
output: {
'sourcemap': false,
'format': 'es',
'banner': banner,
'outro' : outro,
'file': pkg.module
}
}
];
1
https://gitee.com/BestMyGod/maptalk.three.git
git@gitee.com:BestMyGod/maptalk.three.git
BestMyGod
maptalk.three
maptalk.three
master

搜索帮助