package ppx_platform

Build not checked
  1. Overview
  2. Docs
On This Page
  1. 0.2.0
  2. 0.1.0
Platform-specific code for native and Melange builds

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ppx_platform-0.2.0.tbz
sha256=3b63eb4fc72762bedb12b51f34b05976f096916ea886ea8f54dafe22474e276d
sha512=5acbd9de60cfd026ddd92078e5943d6f3081d4299ee3ba2e2194d11e5e6a6fc93d6b0166684109bc1fd9549334e73cd6951dda0e61199ab527194038083b345d

doc/CHANGES.html

Changes

0.2.0

  • Add Native and Melange cases to match%platform / switch%platform. Server, Client, Runtime.Server and Runtime.Client still work and can be mixed with the new cases.
  • Add [@melange_only] / [@@melange_only], let%melange_only and [%melange_only ...], the new names of [@browser_only] / [@platform js] and browser_only. Native code gets a melange_only alert, not browser_only.
  • Add [@native_only] / [@@native_only], the new name of [@platform native].
  • The old names keep working in this release and will be removed in 1.0.0.

0.1.0

Initial release, extracted from browser_ppx in server-reason-react.

  • Add let%browser_only, %browser_only expressions and the [@browser_only] attribute.
  • Add [@platform js] and [@platform native] attributes.
  • Add switch%platform with Server/Client and Runtime.Server/Runtime.Client patterns.
  • Add the -js driver flag to preprocess for Melange.
  • Add ppx_platform.runtime, with the Ppx_platform_runtime module that the generated code calls.