Skip to content

Commit

Permalink
Add opam (#318)
Browse files Browse the repository at this point in the history
* Add dummy opam file

* Remove dune-projects

* Add lwt_ppx and alcotest_lwt as opam deps

* Bump version to 0.33.0
  • Loading branch information
davesnx authored Jan 27, 2023
1 parent 0b6b3d0 commit 1116643
Show file tree
Hide file tree
Showing 21 changed files with 69 additions and 141 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@davesnx/styled-ppx",
"version": "0.32.2",
"version": "0.33.0",
"description": "Typed styled components in ReScript",
"author": "David Sancho <[email protected]>",
"license": "MIT",
Expand Down Expand Up @@ -54,7 +54,7 @@
"test_bs": "cd packages/ppx/test/browser; yarn; yarn build; yarn test",
"dev": "esy dune build --root . --watch",
"release-static":
"esy b dune build --root . --ignore-promoted-rules --no-config --profile release-static --only-packages styled-ppx,reason-css-parser,reason-css-lexer,css-spec-parser,styled-ppx-css-parser,string-interpolation",
"esy b dune build --root . --ignore-promoted-rules --no-config --profile release-static --only-packages styled-ppx",
"ast": "esy dune exec packages/renderer/ast_renderer.exe --",
"lexer": "esy dune exec packages/renderer/lexer_renderer.exe --"
}
Expand Down
17 changes: 0 additions & 17 deletions packages/css-spec-parser/dune-project

This file was deleted.

2 changes: 1 addition & 1 deletion packages/css-spec-parser/lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

(library
(name css_spec_parser)
(public_name css-spec-parser.lib)
(public_name styled-ppx.css-spec-parser)
(libraries sedlex menhirLib)
(preprocess
(pps sedlex.ppx ppx_deriving.show)))
2 changes: 1 addition & 1 deletion packages/css-spec-parser/test/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(test
(name CSSSpecParserTest)
(libraries css-spec-parser.lib alcotest))
(libraries styled-ppx.css-spec-parser alcotest))

(rule
(alias css_spec_parser_test)
Expand Down
16 changes: 0 additions & 16 deletions packages/instant/dune-project

This file was deleted.

17 changes: 0 additions & 17 deletions packages/parser/dune-project

This file was deleted.

4 changes: 2 additions & 2 deletions packages/parser/lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
(library
(name styled_ppx_css_parser)
(wrapped false)
(public_name styled-ppx-css-parser)
(public_name styled-ppx.css-parser)
(libraries
sedlex
menhirLib
ocaml-migrate-parsetree
str
reason-css-lexer.lib)
styled-ppx.reason-css-lexer)
(preprocess
(pps sedlex.ppx)))
2 changes: 1 addition & 1 deletion packages/parser/test/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(test
(name Runner)
(libraries styled-ppx-css-parser alcotest))
(libraries styled-ppx.css-parser alcotest))

(rule
(alias parser_test)
Expand Down
6 changes: 3 additions & 3 deletions packages/ppx/src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
(public_name styled-ppx.lib)
(kind ppx_rewriter)
(libraries
styled-ppx-css-parser
reason-css-parser.lib
string-interpolation.lib
styled-ppx.css-parser
styled-ppx.reason-css-parser
styled-ppx.string-interpolation
ppxlib
str)
(preprocess
Expand Down
21 changes: 0 additions & 21 deletions packages/reason-css-lexer/LICENSE

This file was deleted.

16 changes: 0 additions & 16 deletions packages/reason-css-lexer/dune-project

This file was deleted.

2 changes: 1 addition & 1 deletion packages/reason-css-lexer/lib/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(library
(name reason_css_lexer)
(public_name reason-css-lexer.lib)
(public_name styled-ppx.reason-css-lexer)
(libraries compiler-libs sedlex)
(preprocess
(pps sedlex.ppx ppx_deriving.show)))
2 changes: 1 addition & 1 deletion packages/reason-css-lexer/test/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(test
(name Tokenizer_test)
(libraries reason-css-lexer.lib alcotest))
(libraries styled-ppx.reason-css-lexer alcotest))

; This creates an alias "css_lexer_test" that can be run with `dune build @css_lexer_test`

Expand Down
17 changes: 0 additions & 17 deletions packages/reason-css-parser/dune-project

This file was deleted.

8 changes: 6 additions & 2 deletions packages/reason-css-parser/lib/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
(library
(name reason_css_parser)
(public_name reason-css-parser.lib)
(libraries sedlex css-spec-parser.lib reason-css-lexer.lib compiler-libs)
(public_name styled-ppx.reason-css-parser)
(libraries
sedlex
styled-ppx.css-spec-parser
styled-ppx.reason-css-lexer
compiler-libs)
(preprocess
(per_module
((pps reason_css_parser_ppx sedlex.ppx)
Expand Down
4 changes: 2 additions & 2 deletions packages/reason-css-parser/ppx/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(library
(name reason_css_parser_ppx_lib)
(wrapped false)
(libraries ocaml-migrate-parsetree css-spec-parser.lib ppxlib)
(libraries ocaml-migrate-parsetree styled-ppx.css-spec-parser ppxlib)
(modules Generate)
(preprocess
(pps ppxlib.metaquot)))
Expand All @@ -12,7 +12,7 @@
(wrapped false)
(libraries
ocaml-migrate-parsetree
css-spec-parser.lib
styled-ppx.css-spec-parser
ppxlib
reason_css_parser_ppx_lib)
(modules Reason_css_parser_ppx)
Expand Down
2 changes: 1 addition & 1 deletion packages/reason-css-parser/test/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(test
(name Runner)
(libraries reason-css-parser.lib alcotest reason_css_parser_ppx_lib)
(libraries alcotest styled-ppx.reason-css-parser reason_css_parser_ppx_lib)
(preprocess
(pps reason_css_parser_ppx sedlex.ppx ppxlib.metaquot)))

Expand Down
6 changes: 3 additions & 3 deletions packages/renderer/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
(name ast_renderer)
(public_name ast-renderer)
(modules ast_renderer)
(libraries styled-ppx-css-parser)
(libraries styled-ppx.css-parser)
(link_flags -linkall))

(executable
(name lexer_renderer)
(public_name lexer-renderer)
(modules lexer_renderer)
(libraries styled-ppx-css-parser sedlex)
(libraries styled-ppx.css-parser sedlex)
(preprocess
(pps sedlex.ppx))
(link_flags -linkall))
Expand All @@ -18,5 +18,5 @@
(name spec_renderer)
(public_name spec-renderer)
(modules spec_renderer)
(libraries css-spec-parser.lib)
(libraries styled-ppx.css-spec-parser)
(link_flags -linkall))
16 changes: 0 additions & 16 deletions packages/string_interpolation/dune-project

This file was deleted.

2 changes: 1 addition & 1 deletion packages/string_interpolation/src/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(library
(name string_interpolation)
(public_name string-interpolation.lib)
(public_name styled-ppx.string-interpolation)
(libraries ppxlib sedlex)
(preprocess
(pps sedlex.ppx)))
Expand Down
44 changes: 44 additions & 0 deletions styled-ppx.opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
opam-version: "2.0"
synopsis: "Type-safe styled components for ReScript with type-safe CSS"
description: """
styled-ppx is the ppx that brings typed styled components to ReScript, allowing you to create React Components with type-safe style definitions with CSS.
"""
maintainer: "David Sancho <[email protected]>"
authors: "David Sancho <[email protected]>"
license: "MIT"
homepage: "https://styled-ppx.vercel.app"
bug-reports: "https://github.com/davesnx/styled-ppx/issues"
depends: [
"alcotest-lwt" {= "1.6.0"}
"alcotest" {= "1.6.0"}
"dune" {>= "3.0"}
"lwt_ppx" {= "2.1.0"}
"menhir" {= "20220210"}
"ocaml-migrate-parsetree" {= "2.4.0"}
"ocaml" {= "4.14.0"}
"patdiff" {= "v0.15.0"}
"ppx_deriving" {= "5.2.1"}
"ppxlib" {= "0.27.0"}
"reason" {= "3.8.1"}
"sedlex" {= "3.0"}
"ocaml-lsp-server" {dev}
"ocamlformat" {dev}
"utop" {dev}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"--promote-install-files=false"
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["dune" "install" "-p" name "--create-install-files" name]
]
dev-repo: "git+https://github.com/davesnx/styled-ppx.git"

0 comments on commit 1116643

Please sign in to comment.