Commit d784e560 authored by S Anand's avatar S Anand

BUG: rollup should extend, not replace, g1 namespace. Fixes #145 @tejesh.p

parent 2254ecd0
Pipeline #75417 passed with stage
in 2 minutes and 13 seconds
......@@ -15,7 +15,8 @@ export default [
output: {
file: "dist/g1.js",
format: "umd",
name: "g1"
name: "g1",
extend: true
},
plugins: [
resolve(),
......@@ -29,7 +30,8 @@ export default [
output: {
file: "dist/g1.min.js",
format: "umd",
name: "g1"
name: "g1",
extend: true
},
plugins: [
resolve(),
......@@ -41,17 +43,17 @@ export default [
},
{
input: "index-datafilter",
output: { file: "dist/datafilter.min.js", format: "umd", name: "g1" },
output: { file: "dist/datafilter.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
input: "index-urlfilter",
output: { file: "dist/urlfilter.min.js", format: "umd", name: "g1" },
output: { file: "dist/urlfilter.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
input: "index-formhandler",
output: { file: "dist/formhandler.min.js", format: "umd", name: "g1" },
output: { file: "dist/formhandler.min.js", format: "umd", name: "g1", extend: true},
plugins: [
htmlparts('src/formhandler.template.html'),
process.env.npm_lifecycle_event == 'dev' ? '' : uglify()
......@@ -59,33 +61,33 @@ export default [
},
{
input: "index-highlight",
output: { file: "dist/highlight.min.js", format: "umd", name: "g1" },
output: { file: "dist/highlight.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
input: "index-template",
output: { file: "dist/template.min.js", format: "umd", name: "g1" },
output: { file: "dist/template.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
input: "index-translate",
output: { file: "dist/translate.min.js", format: "umd", name: "g1" },
output: { file: "dist/translate.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
input: "index-event",
output: { file: "dist/event.min.js", format: "umd", name: "g1" },
output: { file: "dist/event.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
input: "index-leaflet",
output: { file: "dist/leaflet.min.js", format: "umd", name: "g1" },
output: { file: "dist/leaflet.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
input: "index-mapviewer",
output: {
file: "dist/mapviewer.min.js", format: "umd", name: "g1", globals: {
file: "dist/mapviewer.min.js", format: "umd", name: "g1", extend: true, globals: {
leaflet: 'L',
d3: 'd3'
}
......@@ -101,22 +103,22 @@ export default [
},
{
input: "index-sanddance",
output: { file: "dist/sanddance.min.js", format: "umd", name: "g1" },
output: { file: "dist/sanddance.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
input: "index-scale",
output: { file: "dist/scale.min.js", format: "umd", name: "g1" },
output: { file: "dist/scale.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()],
},
{
input: "index-urlchange",
output: { file: "dist/urlchange.min.js", format: "umd", name: "g1" },
output: { file: "dist/urlchange.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
input: "index-ajax",
output: { file: "dist/ajax.min.js", format: "umd", name: "g1" },
output: { file: "dist/ajax.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
},
{
......@@ -129,7 +131,8 @@ export default [
output: {
file: "dist/dropdown.min.js",
format: "umd",
name: "g1"
name: "g1",
extend: true
}
},
{
......@@ -141,12 +144,13 @@ export default [
output: {
file: "dist/search.min.js",
format: "umd",
name: "g1"
name: "g1",
extend: true
}
},
{
input: "index-types",
output: { file: "dist/types.min.js", format: "umd", name: "g1" },
output: { file: "dist/types.min.js", format: "umd", name: "g1", extend: true },
plugins: [uglify()]
}
]
......@@ -13,6 +13,7 @@
<script src="../node_modules/leaflet/dist/leaflet.js"></script>
<script src="../node_modules/d3/build/d3.js"></script>
<script src="../node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.min.js"></script>
<script src="../dist/g1.min.js"></script>
<script src="../dist/mapviewer.min.js"></script>
<style>
.map {
......@@ -304,7 +305,7 @@
}
}
}
var mapviewer1 = new g1.MapViewer(conf)
var mapviewer1 = g1.mapviewer(conf)
// tape("g1.mapviewer function test cases", function (test) {
// // test circleMarker, marker
// test.end()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment