Skip to content

Commit 7dc7d5d

Browse files
committed
Rename: re-dnd -> rescript-dnd
1 parent 491eedf commit 7dc7d5d

File tree

11 files changed

+34
-29
lines changed

11 files changed

+34
-29
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
node_modules/
22
lib/
33
dist/
4+
yarn-error.log
5+
*.bs.js
6+
.vercel
47
.merlin
58
.bsb.lock
6-
*.bs.js
7-
yarn-error.log
89
.cache
910
.DS_Store

HISTORY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* **[ BREAKING ]** Move `bs-webapi` to peer dependensies.
1010

1111
## 2.0.0
12-
* **[ BREAKING ]** Modules of `DndEntry` type must provide `cmp` function to avoid polymorphic comparison. See [this diff](https://github.com/MinimaHQ/re-dnd/commit/238a0abab8ad88a7c643c0b022c49887c025a89b) for details.
12+
* **[ BREAKING ]** Modules of `DndEntry` type must provide `cmp` function to avoid polymorphic comparison. See [this diff](https://github.com/MinimaHQ/rescript-dnd/commit/238a0abab8ad88a7c643c0b022c49887c025a89b) for details.
1313
* **[ BREAKING ]** Minimum required version of `bs-platform` is `7.1.1`.
1414
* **[ BREAKING ]** Minimum required version of `reason-react` is `0.8.0`.
1515

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# re-dnd
1+
# rescript-dnd
22

3-
[![npm version](https://img.shields.io/npm/v/re-dnd.svg?style=flat-square)](https://www.npmjs.com/package/re-dnd)
4-
[![build status](https://img.shields.io/travis/alexfedoseev/re-dnd/master.svg?style=flat-square)](https://travis-ci.org/alexfedoseev/re-dnd)
5-
[![license](https://img.shields.io/npm/l/re-dnd.svg?style=flat-square)](https://www.npmjs.com/package/re-dnd)
3+
[![npm version](https://img.shields.io/npm/v/rescript-dnd.svg?style=flat-square)](https://www.npmjs.com/package/rescript-dnd)
4+
[![build status](https://img.shields.io/travis/alexfedoseev/rescript-dnd/master.svg?style=flat-square)](https://travis-ci.org/alexfedoseev/rescript-dnd)
5+
[![license](https://img.shields.io/npm/l/rescript-dnd.svg?style=flat-square)](https://www.npmjs.com/package/rescript-dnd)
66

77
Drag & drop for [`@rescript/react`](https://reasonml.github.io/reason-react/).
88

@@ -20,16 +20,16 @@ Drag & drop for [`@rescript/react`](https://reasonml.github.io/reason-react/).
2020

2121
```shell
2222
# yarn
23-
yarn add re-dnd
23+
yarn add rescript-dnd
2424
# or npm
25-
npm install --save re-dnd
25+
npm install --save rescript-dnd
2626
```
2727

2828
Then add it to `bsconfig.json`:
2929

3030
```json
3131
"bs-dependencies": [
32-
"re-dnd"
32+
"rescript-dnd"
3333
]
3434
```
3535

@@ -39,7 +39,7 @@ Then add it to `bsconfig.json`:
3939
* [Api](./docs/03-Api.md)
4040

4141
## Examples
42-
* Demos: [`live`](https://re-dnd.now.sh) | [`sources`](./examples)
42+
* Demos: [`live`](https://rescript-dnd.vercel.app) | [`sources`](./examples)
4343
* Production app: [`Minima`](https://minima.app)
4444

4545
## State

bsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "re-dnd",
2+
"name": "rescript-dnd",
33
"sources": [
44
{
55
"dir": "src",
@@ -23,9 +23,11 @@
2323
"react-jsx": 3
2424
},
2525
"refmt": 3,
26-
"bsc-flags": ["-open Belt"],
26+
"bsc-flags": [
27+
"-open Belt"
28+
],
2729
"ppx-flags": [
28-
["rescript-logger/ppx", "--lib=re-dnd"],
30+
["rescript-logger/ppx", "--lib=rescript-dnd"]
2931
],
3032
"package-specs": {
3133
"module": "es6",

docs/01-GettingStartedGuide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ module Container = {
7171
}
7272
```
7373

74-
For convenience, `re-dnd` exposes functor which would create such singleton for you, so you don't have to type this boilerplate yourself:
74+
For convenience, `rescript-dnd` exposes functor which would create such singleton for you, so you don't have to type this boilerplate yourself:
7575

7676
```rescript
7777
module Container = Dnd.MakeSingletonContainer()
@@ -238,4 +238,4 @@ let make = () => {
238238
_Source code of the final module for this guide: [`GettingStartedGuide.res`](../examples/guides/GettingStartedGuide.res)_
239239

240240
---
241-
This guide gives base overview of how `re-dnd` works. To find out more about how to make it safer and how to deal with multiple containers—proceed to the [next guide](./02-SaferIdentifiersAndMultipleContainersGuide.md).
241+
This guide gives base overview of how `rescript-dnd` works. To find out more about how to make it safer and how to deal with multiple containers—proceed to the [next guide](./02-SaferIdentifiersAndMultipleContainersGuide.md).

docs/02-SaferIdentifiersAndMultipleContainersGuide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Safer identifiers and multiple containers
22
In this guide, we will build a UI with multiple todo lists, each contains todos that can be reordered within a list, as well as dragged between the lists.
33

4-
Most of the topics here are more advanced (relative to [Getting Started](./01-GettingStartedGuide.md) guide), though these are mostly not specific to the `re-dnd`.
4+
Most of the topics here are more advanced (relative to [Getting Started](./01-GettingStartedGuide.md) guide), though these are mostly not specific to the `rescript-dnd`.
55

66
## Safe identifiers
77
Pretty much each entity in our apps has special field that uniquely identifies it. Usually, it's called `id`. Type of such identifier can be `int` or `string` (or any other serializable data type). But when we deal with identifiers of these loose types, there are no guarantees that entity of identifier is not confused with identifier of another entity or even some arbitrary `int` or `string`. In some cases, like handling of nested lists, it can cause nasty bugs that won't be caught by compiler. But this is fixable.
@@ -370,6 +370,6 @@ let reducer = (state, action) =>
370370
_Source code of the final module for this guide: [`SaferIdentifiersAndMultipleContainersGuide.res`](../examples/guides/SaferIdentifiersAndMultipleContainersGuide.res)_
371371

372372
---
373-
Phew, this was a long read! If you're interested in more examples, checkout [live demo](https://re-dnd.now.sh/) and its [sources](../examples).
373+
Phew, this was a long read! If you're interested in more examples, checkout [live demo](https://rescript-dnd.vercel.app/) and its [sources](../examples).
374374

375375
Or you can explore [API doc](./03-Api.md).

docs/03-Api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ let make: (
7676
```
7777

7878
## `Dnd.MakeSingletonContainer` functor
79-
For convenience, `re-dnd` exposes this functor which would create `Container` module when there is no specific entity in the app domain which can be associated with container that holds some single list of items in UI.
79+
For convenience, `rescript-dnd` exposes this functor which would create `Container` module when there is no specific entity in the app domain which can be associated with container that holds some single list of items in UI.
8080

8181
```rescript
8282
module Container: DndEntry = Dnd.MakeSingletonContainer()

examples/components/Example.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ module Container = {
1919
])}>
2020
<div className="example-navbar-mobile">
2121
<Control onClick={_ => showMobileNav()}> <MenuIcon /> </Control>
22-
<h1> {"re-dnd"->React.string} </h1>
23-
<a href="https://github.com/alexfedoseev/re-dnd"> <GithubIcon /> </a>
22+
<h1> {"rescript-dnd"->React.string} </h1>
23+
<a href="https://github.com/shakacode/rescript-dnd"> <GithubIcon /> </a>
2424
</div>
2525
children
2626
</div>

examples/components/Nav.res

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
let make = (~route, ~mobileNavShown, ~hideMobileNav) =>
33
<nav className={mobileNavShown ? "shown-mobile" : ""}>
44
<header>
5-
<h1 onClick={_ => RescriptReactRouter.push("/")}> {"re-dnd"->React.string} </h1>
6-
<a href="https://github.com/alexfedoseev/re-dnd" className="github-link"> <GithubIcon /> </a>
5+
<h1 onClick={_ => RescriptReactRouter.push("/")}> {"rescript-dnd"->React.string} </h1>
6+
<a href="https://github.com/shakacode/rescript-dnd" className="github-link">
7+
<GithubIcon />
8+
</a>
79
<Control className="close-button" onClick={_ => hideMobileNav()}> <CloseIcon /> </Control>
810
</header>
911
<Link path="vertical-list" active={route == Route.VerticalList}>

examples/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33
<head>
44
<meta charset="utf-8">
5-
<title>re-dnd</title>
5+
<title>rescript-dnd</title>
66
<link rel="stylesheet" href="./index.css" />
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
</head>

0 commit comments

Comments
 (0)