Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
81 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 8 | ||
}, | ||
"env": { | ||
"es6": true | ||
}, | ||
"rules": { | ||
"no-cond-assign": 0, | ||
"no-constant-condition": 0, | ||
"no-floating-decimal": 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
*.sublime-workspace | ||
.DS_Store | ||
build/ | ||
dist/ | ||
test/output/ | ||
node_modules | ||
npm-debug.log | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
*.sublime-* | ||
build/*.zip | ||
dist/*.zip | ||
test/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,36 @@ | ||
export default { | ||
input: "index", | ||
external: [ | ||
"d3-array", | ||
"d3-geo", | ||
"d3-geo-projection" | ||
], | ||
import {terser} from "rollup-plugin-terser"; | ||
import * as meta from "./package.json"; | ||
|
||
const config = { | ||
input: "src/index.js", | ||
external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)), | ||
output: { | ||
extend: true, | ||
file: "build/d3-geo-polygon.js", | ||
file: `dist/${meta.name}.js`, | ||
name: "d3", | ||
format: "umd", | ||
globals: { | ||
"d3-array": "d3", | ||
"d3-geo": "d3", | ||
"d3-geo-projection": "d3" | ||
indent: false, | ||
extend: true, | ||
banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`, | ||
globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"}))) | ||
}, | ||
plugins: [] | ||
}; | ||
|
||
export default [ | ||
config, | ||
{ | ||
...config, | ||
output: { | ||
...config.output, | ||
file: `dist/${meta.name}.min.js` | ||
}, | ||
name: "d3" | ||
plugins: [ | ||
...config.plugins, | ||
terser({ | ||
output: { | ||
preamble: config.output.banner | ||
} | ||
}) | ||
] | ||
} | ||
}; | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export {default as geoClipPolygon} from "./clip/polygon"; | ||
export {default as geoPolyhedral} from "./polyhedral/index"; | ||
export {default as geoPolyhedralButterfly} from "./polyhedral/butterfly"; | ||
export {default as geoPolyhedralCollignon} from "./polyhedral/collignon"; | ||
export {default as geoPolyhedralWaterman} from "./polyhedral/waterman"; | ||
export {default as geoPolyhedralVoronoi} from "./polyhedral/voronoi"; | ||
export {default as geoDodecahedral} from "./polyhedral/dodecahedral"; | ||
export {default as geoCox, coxRaw as geoCoxRaw} from "./cox.js"; | ||
export {default as geoTetrahedralLee, leeRaw as geoLeeRaw} from "./tetrahedralLee.js"; | ||
export {default as geoGrayFullerRaw} from "./grayfuller"; | ||
export {default as geoAirocean} from "./airocean"; | ||
export {default as geoIcosahedral} from "./icosahedral"; | ||
export {default as geoCubic} from "./cubic"; | ||
export {default as geoCahillKeyes, cahillKeyesRaw as geoCahillKeyesRaw} from "./cahillKeyes"; |