Skip to content

Commit ce9d3e5

Browse files
authored
Merge pull request #1 from greenfinity/update-first-release
Update first release
2 parents 2ba0123 + 06aa1fc commit ce9d3e5

File tree

4 files changed

+1640
-9
lines changed

4 files changed

+1640
-9
lines changed

__tests__/.gitkeep

Whitespace-only changes.

package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"rescript:clean": "yarn rescript clean",
1111
"rescript:build": "yarn rescript build -with-deps",
1212
"rescript:dev": "yarn rescript build -with-deps -w",
13+
"test": "yarn vitest --run --coverage --allow-only",
14+
"test:dev": "yarn vitest",
1315
"yalc:dev": "yarn rescript:dev & yarn nodemon -x \"yalc push\"",
1416
"yalc:push": "yarn nodemon -e res -x \"yalc push\""
1517
},
@@ -28,23 +30,32 @@
2830
"homepage": "https://github.com/greenfinity/rescript-react-email#readme",
2931
"files": [
3032
"src",
31-
"lib",
33+
"lib/bs/**/*",
34+
"__tests__/.gitkeep",
3235
"rescript.json"
3336
],
3437
"devDependencies": {
38+
"@greenfinity/rescript-vitest": "^0.1.0",
3539
"@react-email/components": "^0.3.1",
3640
"@rescript/react": "^0.14.0-rc.1",
41+
"@vitest/coverage-v8": "2.1.8",
3742
"auto-changelog": "^2.5.0",
3843
"nodemon": "^3.1.7",
3944
"react": "^19.0.0",
4045
"react-dom": "^19.0.0",
41-
"rescript": "^11.1.0"
46+
"rescript": "^11.1.0",
47+
"vitest": "^2.1.8"
4248
},
4349
"peerDependencies": {
4450
"@react-email/components": "^0.3.1",
4551
"@rescript/react": "^0.14.0-rc.1",
4652
"react": "^19.0.0",
4753
"react-dom": "^19.0.0"
4854
},
55+
"peerDevDependencies": {
56+
"@greenfinity/rescript-vitest": "^0.1.0",
57+
"@vitest/coverage-v8": "2.1.8",
58+
"vitest": "^2.1.8"
59+
},
4960
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
5061
}

vitest.config.mjs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { defineConfig } from "vitest/config";
2+
import path from "path";
3+
4+
const projectRootPath = path.resolve(".");
5+
6+
export default defineConfig({
7+
test: {
8+
include: ["**/__tests__/**/*_vitest.bs.mjs"],
9+
globals: true,
10+
reporters: "verbose",
11+
environment: "jsdom",
12+
coverage: {
13+
provider: "v8",
14+
include: ["src/**/*.{bs.mjs}"],
15+
exclude: ["node_modules/"],
16+
reportsDirectory: "./coverage",
17+
reporter: ["text", "json", "html"],
18+
},
19+
},
20+
resolve: {
21+
alias: [],
22+
},
23+
});

0 commit comments

Comments
 (0)