Skip to content

Commit 124352d

Browse files
authored
[POC] Support JSX4 (#335)
1 parent ee94af4 commit 124352d

File tree

201 files changed

+65646
-19981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+65646
-19981
lines changed

.githooks/pre-push

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ esy test_css_spec_parser
4545
echo "Run CSS Spec Types tests"
4646
esy test_css_spec_types
4747

48-
echo "Run End-to-end tests"
49-
yarn --cwd e2e test
48+
echo "Run End-to-end tests for JSX3"
49+
yarn --cwd 'e2e/rescript-v9-JSX3' test
50+
51+
# echo "Run End-to-end tests for JSX4"
52+
# yarn --cwd 'e2e/rescript-v10-JSX4' test
5053

5154
exit 0

.github/workflows/ci.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Ppx CI
22

33
on:
44
push:
5-
branches:
6-
- main
75
pull_request:
86
branches:
97
- main
@@ -59,7 +57,6 @@ jobs:
5957
esy import-dependencies _export
6058
rm -rf _export
6159
62-
6360
- name: Build dependencies
6461
run: esy build-dependencies
6562

@@ -120,7 +117,7 @@ jobs:
120117
uses: actions/upload-artifact@v3
121118
with:
122119
name: ${{ matrix.os }}
123-
path: _build/default/bin/ppx.exe
120+
path: _build/default/bin/bin.exe
124121

125122
# Cleanup build cache in case dependencies have changed
126123
- name: Cleanup
@@ -147,11 +144,11 @@ jobs:
147144
path: _build/default/bin
148145

149146
- name: Grant permission to run ppx
150-
run: chmod +x _build/default/bin/ppx.exe
147+
run: chmod +x _build/default/bin/bin.exe
151148

152149
- name: Get cache directory path
153150
id: yarn-cache-dir-path
154-
working-directory: ./e2e
151+
working-directory: ./e2e/rescript-v9-JSX3
155152
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
156153

157154
- name: Load global cache
@@ -163,11 +160,11 @@ jobs:
163160
restore-keys: yarn-${{ matrix.os }}-
164161

165162
- name: Install dependencies
166-
working-directory: ./e2e
163+
working-directory: ./e2e/rescript-v9-JSX3
167164
run: yarn
168165

169166
- name: Test
170-
working-directory: ./e2e
167+
working-directory: ./e2e/rescript-v9-JSX3
171168
run: yarn test
172169

173170
publish:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ Temporary Items
3030
*.cmo
3131
*.cma
3232
*.cmi
33+
*.cmt
34+
*.cmj
3335
*.a
3436
*.o
3537
*.cmx

bin/ppx.re renamed to bin/bin.re

File renamed without changes.

bin/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
(executable
2-
(name ppx)
2+
(name bin)
33
(public_name styled-ppx)
44
(libraries styled-ppx.lib))

dune-project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(lang dune 2.9)
2+
(cram enable)
23

34
(using menhir 2.0)
45

packages/demo/bucklescript/bsconfig.json renamed to e2e/bucklescript-v8/bsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "demo-bucklescript",
2+
"name": "styled-ppx-demo-bucklescript-v8",
33
"reason": {
44
"react-jsx": 3
55
},
@@ -18,7 +18,7 @@
1818
}
1919
],
2020
"ppx-flags": [
21-
["../../../_build/default/bin/ppx.exe", "--compat-with-bs-emotion-ppx true"]
21+
["../../_build/default/bin/bin.exe", "--compat-with-bs-emotion-ppx true"]
2222
],
2323
"suffix": ".bs.js",
2424
"namespace": true,

packages/demo/bucklescript/package.json renamed to e2e/bucklescript-v8/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "demo-bucklescript",
2+
"name": "styled-ppx-demo-bucklescript-v8",
33
"version": "0.0.0",
44
"license": "MIT",
55
"scripts": {

0 commit comments

Comments
 (0)