nitin42 / terminal-in-react

👨‍💻 A component that renders a terminal
http://terminal-in-react.surge.sh/
MIT License
2.12k stars 151 forks source link

Import component locally instead of through NPM #95

Closed naezeroth closed 3 years ago

naezeroth commented 3 years ago

Hello, is there a way to import this component locally (in components folder) and require it from there rather than install through NPM? I need to do this because there are some styling changes I wish to make specifically for my own use case and can only make them through the source code (I trialled this by editing my node_modules/terminal-in-react/ specific css within files)

I'm fairly new to React, so I'd love a pointer in the right direction.

naezeroth commented 3 years ago

I semi-bypassed this by moving the node_modules/terminal-in-react/ to a hidden folder .custom within my root project directory (so it doesn't interfere with Gatsby's build/develop) and simply replaced package.json with this

"terminal-in-react": "file:./.custom/terminal-in-react-custom",

I'm still wondering if there is a better way to do this.

naezeroth commented 3 years ago

All good - I'm super new to all this, but I used styled components to create a parent wrapper div and changed specific css within that.