react-visualizer 5.0.0 → 5.0.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.
@@ -1,48 +1,43 @@
1
1
  #!/usr/bin/env node
2
-
3
- const { parseArgs } = require('node:util');
4
- const makeVisualizerPage = require('../src/makeVisualizerPage');
5
- const { writeFileSync } = require('node:fs');
6
- const assert = require('node:assert');
7
-
2
+ const { parseArgs } = require("node:util");
3
+ const makeVisualizerPage = require("../src/makeVisualizerPage");
4
+ const { writeFileSync } = require("node:fs");
5
+ const assert = require("node:assert");
8
6
  let argv = process.argv.slice(2);
9
- const startIndex = argv.findIndex((arg) => arg === 'makeVisualizerPage');
7
+ const startIndex = argv.findIndex((arg) => arg === "makeVisualizerPage");
10
8
  if (startIndex > -1) {
11
9
  argv = argv.slice(startIndex + 1);
12
10
  }
13
-
14
11
  const { values: args } = parseArgs({
15
12
  args: argv,
16
13
  options: {
17
14
  help: {
18
- type: 'boolean',
19
- short: 'h',
15
+ type: "boolean",
16
+ short: "h"
20
17
  },
21
18
  fallbackVersion: {
22
- type: 'string',
19
+ type: "string"
23
20
  },
24
21
  loadversion: {
25
- type: 'string',
22
+ type: "string"
26
23
  },
27
24
  cdn: {
28
- type: 'string',
25
+ type: "string"
29
26
  },
30
27
  out: {
31
- type: 'string',
32
- default: 'visualizer.html',
28
+ type: "string",
29
+ default: "visualizer.html"
33
30
  },
34
31
  queryType: {
35
- type: 'string',
36
- default: 'query',
37
- },
38
- },
32
+ type: "string",
33
+ default: "query"
34
+ }
35
+ }
39
36
  });
40
-
41
37
  if (args.help) {
42
38
  printHelp();
43
39
  process.exit(0);
44
40
  }
45
-
46
41
  function printHelp() {
47
42
  console.log(`
48
43
  Usage:
@@ -76,7 +71,5 @@ Options:
76
71
  Default: query
77
72
  `);
78
73
  }
79
-
80
74
  const page = makeVisualizerPage(args);
81
-
82
- writeFileSync(args.out, page, 'utf-8');
75
+ writeFileSync(args.out, page, "utf-8");
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "react-visualizer",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "The visualizer in a react component",
5
- "main": "dist/index.js",
5
+ "main": "dist/src/index.js",
6
+ "bin": {
7
+ "makeVisualizerPage": "./dist/bin/makeVisualizerPage.js"
8
+ },
6
9
  "scripts": {
7
- "build": "esbuild 'src/*' --outdir=dist",
10
+ "build": "esbuild 'src/*' 'bin/*' --outdir=dist",
8
11
  "prettier": "prettier --check .",
9
12
  "prettier-write": "prettier --write .",
10
13
  "watch-test": "esbuild test/app.js --bundle --outfile=test/built.js --watch",
11
14
  "prepack": "npm run build"
12
15
  },
13
- "bin": {
14
- "makeVisualizerPage": "./bin/makeVisualizerPage.js"
15
- },
16
16
  "repository": {
17
17
  "type": "git",
18
18
  "url": "git+ssh://git@github.com/cheminfo/visualizer-react.git"
File without changes
File without changes
File without changes