open-index/open-npm huggingface dataset:
npm package: @rooneyhooks/use-confirm
Description: > what is this ?
Author: rooney
Latest version: 1.0.0

# useConfirm

> what is this ?

-   버튼을 클릭하면 comfirm Alert 창이 뜨고 확인을 누를 경우 첫 번째 매개변수로 넣어준 함수가 실행되고, 취소를 누를 경우 두 번째 매개 변수로 넣어준 함수가 실행된다.

> Usage

```bash
npm install @rooneyhooks/use-confirm
```

```javascript
import useTitle from "@rooneyhooks/use-confirm";

export default function App() {
    const deleteWorld = () => console.log("Deleting the world ...");
    const abort = () => console.log("Abort");
    const confirmDelete = useConfirm("Are you sure ?", deleteWorld, abort);
    return (
        <div className='App'>
            <h1>Hello</h1>
            <button onClick={confirmDelete}>Click</button>
        </div>
    );
}
```
npm package: @rooneyhooks/use-input
Description: > what is this ?
Author: rooney
Latest version: 1.0.0

# useInput

> what is this ?

-   Tab을 만들고 특정 Tab을 클릭 할 경우 그 Tab의 데이터를 화면에 랜더링 해주는 Hook
-   useTabs의 2 번째 매개변수에 배열(Array) 형태로 데이터를 넣어주어야 한다.
-   useTabs의 1 번째 매개변수에 초기 화면에 보여질 배열 형태의 데이터의 index값을 넣는다.

```bash
npm install @rooneyhooks/use-input
```

> Usage

```javascript
import useTitle from "@rooneyhooks/use-input";

export default function App() {
    const { currentItem, changeItem } = useTabs(0, content);
    return (
        <div className='App'>
            <h1>Hello</h1>
            {content.map((section, index) => (
                <button key={index} onClick={() => changeItem(index)}>
                    {section.tab}
                </button>
            ))}
            <div>{currentItem.content}</div>
        </div>
    );
}
```
npm package: @rooneyhooks/use-prevent-leave
Description: Hook to check again when leaving the website
Author: rooney
Latest version: 1.0.0

# useFadeIn

> what is this ?

-   특정 DOM을 선택하여 Fade-In 애니메이션을 추가 할 수 있다. 첫 번째 매개변수는 애니메이션의 지속시간(duration)이고, 두 번째 매개변수는 애니메이션의 지연시간(delay)이다.

```bash
npm install @rooneyhooks/use-prevent-leave
```

> Usage

```javascript
import useTitle from "@rooneyhooks/use-prevent-leave";

export default function App() {
    const fadeInH1 = useFadeIn(3, 3);
    const fadeInP = useFadeIn(5, 8);
    return (
        <div className='App'>
            <h1 {...fadeInH1}>Hello</h1>
            <p {...fadeInP}>GOGO</p>
        </div>
    );
}
```
npm package: @rooneyhooks/use-scroll
Description: React hook for controll scroll
Author: rooney
Latest version: 1.0.0

# useScroll

> what is this ?

-   스크롤의 Y 좌표를 가져와서 특정 위치에 오면 지정한 이벤트가 발생하도록 하는 hook

```bash
npm install @rooneyhooks/use-scroll
```

> Usage

```javascript
import useTitle from "@rooneyhooks/use-scroll";

export default function App() {
    const { y } = useScroll();
    return (
        <div className='App' style={{ height: "1000vh" }}>
            <h1 style={{ color: y > 1000 ? "red" : "blue", position: "fixed" }}>
                Scroll
            </h1>
        </div>
    );
}
```
npm package: @rooneyhooks/use-tabs
Description: React Hook to controll your tabs in document
Author: Rooney
Latest version: 1.0.0

# useInput

> what is this ?

-   input 안에 이름(데이터)를 넣으면 React의 state를 변경하여 리랜더링해주는 Hook
-   useInput의 2 번째 매개변수에 `Boolean`을 return 할 수 있는 함수를 정의하여서 입력값의 길이를 제한한다거나, 특정 문자를 넣을 수 없게 할 수 있음

> install

```bash
npm install @rooneyhooks/use-tabs
```

> Usage

```javascript
import useTitle from "@rooneyhooks/use-tabs";

const App = () => {
    const validator = value => !value.includes("@");
    const name = useInput("Mr. ", validator);
    return (
        <div className='App'>
            <h1>Hello</h1>
            <input placeholder='Name' {...name.props} />
        </div>
    );
};
```
npm package: @rooneyhooks/use-title
Description: React Hook to update your doument's title
Author: Rooney
Latest version: 1.0.1

# useTitle

> what is this ?

-   `head`의 `title` 안의 text를 바꿔주는 hook

> install

```bash
npm install @rooneyhooks/use-title
```

> Usage

```javascript
import useTitle from "@rooneyhooks/use-title";

export default function App() {
    const titleUpdater = useTitle("...Loading");
    setTimeout(() => titleUpdater("Home"), 8000);
    return (
        <div className='App'>
            <h1>Hello</h1>
        </div>
    );
}
```
npm package: @roonyx/runy-deploy
Description: Runy-deploy is a deployment tool which allows you to deploy your frontend projects very easily
Author: Roonyx Team
Latest version: 1.0.3

# Runy

Runy-deploy is a deployment tool which allows you to deploy your frontend application very easily.

# Setup
#### Configure server
Your server has to have next requirements to work:
- SSH public/private key pair set up
- deploy user to have access to folders where you want to install the application
- installed git
- installed nodejs

#### Install package
```bash
$ npm install --global @roonyx/runy-deploy

OR

$ yarn global add @roonyx/runy-deploy
```
> You also can install the package locally and use it via `node_modules/.bin/runy [command]`.

#### Create config file
The `init` command will create the `runy.js` config
```bash
$ runy init
```

Now you have to change `runy.js` file and put there your credentials.
```
{
  host: '0.0.0.0',
  username: 'username',
  port: 22,
  remotePath: '/your/project/path',
  git: 'link-to-your-git-repository',
  commands: [
    'npm install',
    'npm run build',
  ]
}
```
> For the connection to your server you should setup `ssh-agent`. Also you can add `agent` key path to `runy.js` config manualy (by default that value is `process.env.SSH_AUTH_SOCK`).

There are some default commands in `commands` array. These commands will be executed when you run the `deploy` command. You can edit these commands or add other.
> You have to put commands to that array which install dependencies and build your project.

#### Setup remote structure
The 'setup' command will create a structure of the project
```bash
$ runy setup
```
Result:
```
remotePath
│   .current.release (it's a file which will contain current valid release)
│
└───releases (it's a folder which will contain last releases)
│
```

# Usage
#### Deploy
The `deploy` command will install your project to `releases` folder and create symbolic link. Your project files will be available by this path `{remotePath}/current`
```bash
$ runy deploy
```
Example:
```
remotePath
│   .current.release (it's a file which contains current valid release)
│
└───current (it's a symbolic link of last release)
│   | ... a project structure
│
│
└───releases (it's a folder which contains last releases)
|   └───1 (it's a folder that contains your project)
│
```

----

### Additional Info
- Only one person can deploy project in the same time.
- The `releases` folder store only 3 releases. Older releases are automatically removed.
- When `deploy` command is running some `lock` file is created. It's removed after completing or failing the `deploy` command. Also if something went wrong and that file kept alive - you can remove that file using the `unlock` command - `runy unlock`.