Skip to content

Commit

Permalink
Sunset melange-* packages
Browse files Browse the repository at this point in the history
  • Loading branch information
davesnx committed Jun 29, 2023
1 parent 75b30b3 commit 0a20d44
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 5 deletions.
1 change: 0 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
(cram enable)

(name server-reason-react)
(version e08f6bb)

(license MIT)

Expand Down
9 changes: 6 additions & 3 deletions packages/melange-fetch/src/Fetch.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ type file
module AbortController = struct
type t = abortController

external signal : t -> signal = "signal" [@@bs.get]
external abort : unit = "abort" [@@bs.send.pipe: t]
external make : unit -> t = "AbortController" [@@bs.new]
(* external signal : t -> signal = "signal" [@@bs.get] *)
let signal _ = assert false
(* external abort : unit = "abort" [@@bs.send.pipe: t] *)
let abort _ = ()
(* external make : unit -> t = "AbortController" [@@bs.new] *)
let make () = assert false
end

type requestMethod =
Expand Down
File renamed without changes.
41 changes: 41 additions & 0 deletions packages/webapi/src/Webapi.re
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module Base64 = Webapi__Base64;

/** @since 0.18.0 */
module Blob = Webapi__Blob;
module Canvas = Webapi__Canvas;
module Dom = Webapi__Dom;
module File = Webapi__File;

/** Re-export from [bs-fetch] for convenience. To use, you will also
need to add the [bs-fetch] package as a dependency.
To get the [FormData] of an HTML form, use
[Webapi.Dom.HtmlFormElement.data].
@since 0.18.0 */
module FormData = Fetch.FormData;

/** Re-export from [bs-fetch] for convenience. See also
{!module:FormData}.
@since 0.18.0 */
module Iterator = FormData.Iterator;

module Performance = Webapi__Performance;

/** @since 0.19.0 */
module ReadableStream = Webapi__ReadableStream;

module ResizeObserver = Webapi__ResizeObserver;
module Url = Webapi__Url;

type rafId;

[@bs.val]
external requestAnimationFrame: (float => unit) => unit =
"requestAnimationFrame";
[@bs.val]
external requestCancellableAnimationFrame: (float => unit) => rafId =
"requestAnimationFrame";
[@bs.val]
external cancelAnimationFrame: rafId => unit = "cancelAnimationFrame";
12 changes: 12 additions & 0 deletions packages/webapi/src/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(include_subdirs unqualified)

(library
(name webapi)
(public_name server-reason-react.webapi)
(wrapped false)
(libraries
server-reason-react.melange-fetch
server-reason-react.js
server-reason-react.melange-runtime)
(preprocess
(pps melange.ppx)))
1 change: 0 additions & 1 deletion server-reason-react.opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "e08f6bb"
synopsis: "Rendering React components on the server natively"
maintainer: ["David Sancho <dsnxmoreno@gmail.com>"]
authors: ["David Sancho <dsnxmoreno@gmail.com>"]
Expand Down

0 comments on commit 0a20d44

Please sign in to comment.