This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,12 @@
open Dune_action_plugin.V1
let action =
let open O in
let path_to_dependency = read_file ~path:(Path.of_string "foo_or_bar") in
path_to_dependency
|> stage ~f:(fun path_to_dependency ->
let+ data = read_file ~path:(Path.of_string path_to_dependency) in
print_endline data)
;;
let () = run action

View file

@ -0,0 +1,7 @@
(executables
(names simple_concatenation choosing_dependency)
(libraries dune_action_plugin))
(alias
(name examples)
(deps simple_concatenation.exe))

View file

@ -0,0 +1,12 @@
open Dune_action_plugin.V1
let action =
let source1 = read_file ~path:(Path.of_string "source1")
and source2 = read_file ~path:(Path.of_string "source2") in
both source1 source2
|> stage ~f:(fun (source1, source2) ->
let data = source1 ^ source2 in
write_file ~path:(Path.of_string "target") ~data)
;;
let () = run action