upmostly / modali

A delightful modal dialog component for React, built from the ground up to support React Hooks.
214 stars 21 forks source link

react-syntax-highlighter #28

Open bwilsoncc opened 5 years ago

bwilsoncc commented 5 years ago

Looks to me like you could remove the react-syntax-highlighter dependency. Oh - I see references to it in the examples but shouldn't it not be in the npm release package?

mikaello commented 5 years ago

I agree with this, react-syntax-highlighter has some additional dependencies, and even if this is not included in the bundle it adds complexity and possibly unnecessary security warnings from NPM. Could we move react-syntax-highlighter to devDependencies?

This is the dependency tree for react-syntax-highlighter:

$ npx npm-remote-ls react-syntax-highlighter --development=false
└─ react-syntax-highlighter@12.0.0
   ├─ @babel/runtime@7.6.3
   │  └─ regenerator-runtime@0.13.3
   ├─ prismjs@1.17.1
   │  └─ clipboard@2.0.4
   │     ├─ tiny-emitter@2.1.0
   │     ├─ good-listener@1.2.2
   │     │  └─ delegate@3.2.0
   │     └─ select@1.1.2
   ├─ lowlight@1.12.1
   │  ├─ fault@1.0.3
   │  │  └─ format@0.2.2
   │  └─ highlight.js@9.15.10
   ├─ refractor@2.10.0
   │  ├─ prismjs@1.17.1
   │  ├─ parse-entities@1.2.2
   │  │  ├─ character-reference-invalid@1.1.3
   │  │  ├─ character-entities@1.2.3
   │  │  ├─ is-alphanumerical@1.0.3
   │  │  │  ├─ is-alphabetical@1.0.3
   │  │  │  └─ is-decimal@1.0.3
   │  │  ├─ character-entities-legacy@1.1.3
   │  │  ├─ is-decimal@1.0.3
   │  │  └─ is-hexadecimal@1.0.3
   │  └─ hastscript@5.1.0
   │     ├─ comma-separated-tokens@1.0.7
   │     ├─ space-separated-tokens@1.1.4
   │     ├─ property-information@5.3.0
   │     │  └─ xtend@4.0.2
   │     └─ hast-util-parse-selector@2.2.2
   └─ highlight.js@9.15.10
aaronleesmu commented 1 year ago

this is back again thanks