open-index/open-npm huggingface dataset:
npm package: @hrdtbs/netlify
Description: Netlify Node.js API client with deploy method
Author: Netlify Inc.
Latest version: 0.0.1

See https://github.com/netlify/js-client

This package was created for personal use to address the issue that netlify js-client has removed support for the deploy
method and the recommended alternative, netlify-cli, is very bloated and not suitable for use on CI.

I do not guarantee that the deploy method will work properly. It also does not support `functions` due to the heavy
@netlify/zip-it-and-ship-it dependencies. Use at your own risk.

References:

- https://github.com/netlify/cli/issues/494
- https://github.com/netlify/cli/issues/4556
- https://github.com/netlify/js-client/issues/157

## Using deploy method

```js
import { NetlifyAPI } from 'netlify'

const client = new NetlifyAPI('1234myAccessToken')

const opts = {
  fnDir: null, // path to a folder of functions to deploy
  branch: null, // branch to pass onto the netlify api
  configPath: null, // path to a netlify.toml file to include in the deploy (e.g. redirect support for manual deploys)
  draft: false, // draft deploy or production deploy
  message: undefined, // a short message to associate with the deploy
  deployTimeout: 1.2e6, // 20 mins
  concurrentHash: 100, // number of parallel hashing calls
  concurrentUpload: 5, // number of files to upload in parallel
  maxRetry: 5, // number of times to try on failed file uploads
  filter: (filepath) => {
    /* return false to filter a file  from the deploy */
  },
  tmpDir: tempy.directory(), // a temporary directory to zip functions into
  statusCb: (statusObj) => {
    // a callback function to receive status events
    // statusObj: {
    //      type: name-of-step
    //      msg: msg to print
    //      phase: [start, progress, stop]
    //  }
    // See https://github.com/netlify/cli/blob/v2.0.0-beta.3/src/commands/deploy.js#L161-L195
    // for an example of how this can be used.
  },
  // passing a deployId will update an existing deploy based on the provided options
  deployId: null,
}

const siteId = '1234abcd'
const buildDir = './build'

const development = await client.deploy(siteId, buildDir, opts)

console.log(development)
```
npm package: @hrdtbs/react-code
Description: ```command yarn add @hrdtbs/react-code ```
Author: hrdtbs
Latest version: 2.3.0

```command
yarn add @hrdtbs/react-code
```

[Prismjs](https://prismjs.com/#supported-languages)

[Examples](https://stackblitz.com/edit/react-code-example?file=index.js)

## useCode(language: string): React.RefObject<HTMLElement>

Highlight the element given `ref` in the specified `language` using Prismjs.

## Code: FunctionComponent<Partial<language: string>>

Code block element. children must be string.

```jsx
import { Code } from "@hrdtbs/react-code"
export default () => (
    <Code>{`

        function func(){
            console.log("hello")
        }

    `}</Code>
)
```

The above is output like the following code.

```js
function func(){
    console.log("hello")
}
```

Unwanted spaces are removed automatically.

## CodeInline: FunctionComponent<Partial<language: string>>

Code inline element. children must be string.

## CodeCollapse: FunctionComponent<Partial<{language: string;summary: string;open: boolean;}>>

Openable Code block element. children must be string.
npm package: @hrdtbs/use-jquery
Description: React Hooks of jQuery
Author: hrdtbs
Latest version: 0.0.2

# useJQuery

```command
$ yarn add @hrdtbs/use-jquery jquery react @types/jquery @types/react
```

```tsx
const App:React.FC = () => {
  const ref = useRef<HTMLDivElement>(null)
  
  useJQuery(ref, $ => {
    $.fadeOut(3000).fadeIn(3000)
  })

  const text = useJQuery(ref, $ => {
    return $.text()
  })
  
  useEffect(()=> {
    console.log(text)
  },[text])
  
  return (
    <div ref={ref}>Hello, jQuery</div>
  )
}
```