react-visualizer 5.2.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -12,6 +12,10 @@ CLI example:
12
12
  npx react-visualizer makeVisualizerPage --help
13
13
  ```
14
14
 
15
+ Dev example:
16
+
17
+ node bin/makeVisualizerPage.js --config=config.example.json
18
+
15
19
  Node.js API: see options of `makeVisualizerPage` function.
16
20
 
17
21
  ## Visualizer
@@ -77,13 +77,16 @@ window.onload = function () {
77
77
  const visualizer = document.createElement('script');
78
78
  const datamain = cdn + '/' + version + '/init';
79
79
  const requirejs = cdn + '/' + version + '/components/requirejs/require.js';
80
+
81
+ const visualizerDiv = document.getElementById('ci-visualizer');
82
+
80
83
 
81
84
  visualizer.setAttribute('data-main', datamain);
82
85
  if(viewURL) {
83
- visualizer.setAttribute('data-ci-view', viewURL);
86
+ visualizerDiv.setAttribute('data-ci-view', viewURL);
84
87
  }
85
88
  if(configURL) {
86
- visualizer.setAttribute('data-ci-config', configURL);
89
+ visualizerDiv.setAttribute('data-ci-config', configURL);
87
90
  }
88
91
  visualizer.setAttribute('src', requirejs);
89
92
  document.head.appendChild(visualizer);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-visualizer",
3
- "version": "5.2.0",
3
+ "version": "5.2.1",
4
4
  "description": "The visualizer in a react component",
5
5
  "main": "dist/src/index.js",
6
6
  "bin": {