Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Removes the markdown component and other dependencies (#159)
Browse files Browse the repository at this point in the history
* removes lodash and showdown. Lodash was unnecessary while showdown has been moved to the playground

* fixes linking

* removes markdown snapshot

* fixes react versions
  • Loading branch information
Tiagoperes authored Oct 22, 2020
1 parent 56ab8a7 commit 83c4057
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 304 deletions.
19 changes: 12 additions & 7 deletions docs/debug_local.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
## Debug beagle-react locally
When debugging beagle-react as a dependency on a local project in your machine, you may experience the error [Invalid Hook Call Warning](https://reactjs.org/warnings/invalid-hook-call-warning.html). This [issue](https://github.com/facebook/react/issues/14257) explains the reason. However, there is a workaround for this problem and it is described below.

```
```bash
cd beagle-react
yarn
yarn build
cd dist
yarn link
cd ../node_modules/react
yarn link
cd ../react-dom
yarn link
yarn link-beagle
cd YOUR_PROJECT
yarn link beagle-react react react-dom
```

If you need to undo the linking and download the dependencies from npm:

```bash
cd beagle-react
yarn unlink-beagle
cd YOUR_PROJECT
yarn unlink beagle-react react react-dom
yarn install --force
```
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"husky": "^4.2.5",
"jest": "^26.1.0",
"lerna": "^3.22.1",
"react": "^16.13.1",
"nodemon": "^2.0.4",
"ts-jest": "25.2.1",
"tscpaths": "https://github.com/Tiagoperes/tscpaths.git#498769882091cfe6fd8c4067bb50843dc4ca551e",
Expand Down
7 changes: 3 additions & 4 deletions packages/beagle-react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@
"test": "jest"
},
"dependencies": {
"lodash": "^4.17.15",
"@zup-it/beagle-web": "1.3.0",
"react-native": "^0.63.2",
"react-native-swiper": "^1.6.0",
"react-native-webview": "^10.8.3",
"@zup-it/beagle-web": "1.3.0"
"react-native-webview": "^10.8.3"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-native-webview": "^10.8.3"
},
"devDependencies": {
"@types/lodash": "^4.14.149"
"react": "16.14.0"
},
"publishConfig": {
"access": "public",
Expand Down
13 changes: 6 additions & 7 deletions packages/beagle-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
"watch": "yarn nodemon --watch src -e ts,tsx --exec yarn build",
"check-types": "tsc --noEmit",
"check-test-types": "tsc ./__tests__/** --noEmit",
"test": "jest"
"test": "jest",
"link-beagle": "cd dist && yarn link && cd ../node_modules/react && yarn link && cd ../react-dom && yarn link && cd ../..",
"unlink-beagle": "cd dist && yarn unlink && cd ../node_modules/react && yarn unlink && cd ../react-dom && yarn unlink && cd ../.."
},
"dependencies": {
"lodash": "^4.17.15",
"react-dom": "^16.13.1",
"showdown": "^1.9.1",
"@zup-it/beagle-web": "1.3.0",
"styled-components": "^5.1.1"
},
Expand All @@ -33,14 +32,14 @@
"react-dom": ">=16.8.0"
},
"devDependencies": {
"@types/lodash": "^4.14.149",
"@types/react-dom": "^16.9.8",
"@types/showdown": "^1.9.3",
"@types/styled-components": "^5.1.0",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.4",
"enzyme-to-json": "^3.5.0",
"jest-mock-extended": "^1.0.10",
"@types/styled-components": "^5.1.0"
"react": "16.14.0",
"react-dom": "16.14.0"
},
"publishConfig": {
"access": "public",
Expand Down
33 changes: 0 additions & 33 deletions packages/beagle-react/src/__tests__/components/Markdown.spec.tsx

This file was deleted.

This file was deleted.

47 changes: 0 additions & 47 deletions packages/beagle-react/src/components/Markdown/index.tsx

This file was deleted.

178 changes: 0 additions & 178 deletions packages/beagle-react/src/components/Markdown/styled.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/beagle-react/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import BeagleSimpleForm from './BeagleSimpleForm'
import BeagleTabView from './BeagleTabView'
import BeagleTabItem from './BeagleTabView/BeagleTabItem'
import BeaglePageView from './BeaglePageView'
import Markdown from './Markdown'
import Modal from './Modal'
import TextArea from './TextArea'
import BeagleInput from './BeagleInput'
Expand Down Expand Up @@ -64,7 +63,6 @@ const beagleDefaultComponents = {
}

const webSpecificComponents = {
'custom:markdown': Markdown,
'custom:modal': Modal,
'custom:text-area': TextArea,
}
Expand Down
Loading

0 comments on commit 83c4057

Please sign in to comment.