Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit a811511

Browse files
author
Ændrew Rininsland
committed
Ugh systemJS
1 parent 52b6025 commit a811511

File tree

5 files changed

+109
-36
lines changed

5 files changed

+109
-36
lines changed

index.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,20 @@ var config = {
1616
paths: {
1717
'npm:': 'https://unpkg.com/',
1818
},
19+
packages: {
20+
babel: {
21+
main: 'browser.min.js',
22+
},
23+
react: {
24+
main: 'react.js',
25+
},
26+
'react-dom': {
27+
main: 'index.js',
28+
},
29+
},
1930
map: Object.assign({}, modules, window.D3_BOOTLOADER_MODULES),
2031
meta: { '*.json': { loader: 'plugin-json' } },
21-
transpiler: 'plugin-babel',
32+
transpiler: 'babel',
2233
};
2334

2435
SystemJS.config(config);

modules.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,16 @@ export default {
4141
'g-legend': 'npm:g-legend@^1/build/g-legend.js',
4242
'g-xaxisdate': 'npm:g-axis@^1/build/g-axis.js',
4343
'g-yaxislinear': 'npm:g-axis@^1/build/g-axis.js',
44-
'plugin-babel': 'npm:systemjs-plugin-babel/plugin-babel.js',
4544
'plugin-json': 'npm:[email protected]/json.js',
4645
'save-svg-as-png': 'npm:[email protected]/lib/saveSvgAsPng.js',
4746
'simple-statistics': 'npm:[email protected]/dist/simple-statistics.js',
48-
'systemjs-babel-build': 'npm:[email protected]/systemjs-babel-browser.js',
4947
'topojson-client': 'npm:[email protected]/dist/topojson-client.js',
5048
'@financial-times/g-components': 'npm:object-assign@^2',
5149
react: 'npm:react@^16.8',
5250
'react-dom': 'npm:react-dom@^16.8',
5351
'prop-types': 'npm:prop-types@^15',
5452
chai: 'https://www.chaijs.com/chai.js',
53+
babel: 'npm:[email protected]',
54+
fbjs: 'npm:[email protected]',
55+
'object-assign': 'npm:[email protected]',
5556
};

package-lock.json

+74-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@
4040
"eslint-plugin-import": "^2.18.0",
4141
"esm": "^3.2.25",
4242
"npm-prepublish": "^1.2.3",
43-
"rollup": "^0.67.4",
44-
"rollup-plugin-commonjs": "^9.3.4",
45-
"rollup-plugin-node-resolve": "^3.4.0",
43+
"rollup": "^1.16.3",
44+
"rollup-plugin-commonjs": "^10.0.1",
45+
"rollup-plugin-node-resolve": "^5.2.0",
4646
"uglify-js": "^3.6.0"
4747
},
4848
"dependencies": {
4949
"cheerio": "^1.0.0-rc.3",
5050
"execa": "^1.0.0",
5151
"pacote": "^9.5.1",
52-
"systemjs": "^0.20.19",
52+
"systemjs": "^0.21.6",
5353
"tmp": "0.0.33"
5454
},
5555
"eslintConfig": {

rollup.config.js

+16-8
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@ import resolve from 'rollup-plugin-node-resolve';
33

44
export default [
55
{
6-
entry: 'index.js',
7-
dest: 'dist/d3-bootloader.js',
8-
format: 'umd',
6+
input: 'index.js',
7+
output: {
8+
file: 'dist/d3-bootloader.js',
9+
format: 'umd',
10+
name: 'bootD3',
11+
sourcemap: true,
12+
},
13+
914
external: ['fs'],
10-
moduleName: 'bootD3',
15+
1116
plugins: [
1217
resolve(),
1318
commonjs({
@@ -19,11 +24,14 @@ export default [
1924
],
2025
},
2126
{
22-
entry: 'offline/index.js',
23-
dest: 'offline/d3-bootloader.js',
24-
format: 'umd',
27+
input: 'offline/index.js',
28+
output: {
29+
file: 'offline/d3-bootloader.js',
30+
format: 'umd',
31+
name: 'bootD3',
32+
sourcemap: true,
33+
},
2534
external: ['fs'],
26-
moduleName: 'bootD3',
2735
plugins: [
2836
resolve(),
2937
commonjs({

0 commit comments

Comments
 (0)