File tree Expand file tree Collapse file tree 7 files changed +65
-4
lines changed
Expand file tree Collapse file tree 7 files changed +65
-4
lines changed Original file line number Diff line number Diff line change 1616 " packages/file-casing-no-namespace" ,
1717 " packages/pure-dev" ,
1818 " packages/with-ppx" ,
19- " packages/nohoist"
19+ " packages/nohoist" ,
20+ " packages/standalone"
2021 ],
2122 "nohoist" : [
2223 " rescript-bun"
2627 "rescript" : " 12.0.0-beta.1"
2728 },
2829 "scripts" : {
29- "build" : " ../target/release/rewatch build ." ,
30+ "build" : " ../target/release/rescript build ." ,
3031 "build:rescript" : " rescript legacy build" ,
31- "watch" : " ../target/release/rewatch watch ." ,
32+ "watch" : " ../target/release/rescript watch ." ,
3233 "watch:rescript" : " rescript legacy watch" ,
33- "clean" : " ../target/release/rewatch clean ." ,
34+ "clean" : " ../target/release/rescript clean ." ,
3435 "clean:rescript" : " rescript clean"
3536 }
3637}
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @testrepo/standalone" ,
3+ "version" : " 1.0.0" ,
4+ "dependencies" : {
5+ "@testrepo/dep01" : " *"
6+ }
7+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " standalone" ,
3+ "sources" : {
4+ "dir" : " src" ,
5+ "subdirs" : true
6+ },
7+ "package-specs" : {
8+ "module" : " es6" ,
9+ "in-source" : true
10+ },
11+ "suffix" : " .mjs" ,
12+ "dependencies" : [" @testrepo/dep01" ]
13+ }
Original file line number Diff line number Diff line change 1+ // Generated by ReScript, PLEASE EDIT WITH CARE
2+
3+ import * as Dep01 from "@testrepo/dep01/src/Dep01.mjs" ;
4+
5+ function standalone ( ) {
6+ Dep01 . log ( ) ;
7+ console . log ( "standalone" ) ;
8+ }
9+
10+ export {
11+ standalone ,
12+ }
13+ /* Dep01 Not a pure module */
Original file line number Diff line number Diff line change 1+ let standalone = () => {
2+ Dep01 .log ()
3+ Js .log ("standalone" )
4+ }
Original file line number Diff line number Diff line change @@ -164,6 +164,14 @@ __metadata:
164164 languageName : unknown
165165 linkType : soft
166166
167+ " @testrepo/standalone@workspace:packages/standalone " :
168+ version : 0.0.0-use.local
169+ resolution : " @testrepo/standalone@workspace:packages/standalone"
170+ dependencies :
171+ " @testrepo/dep01 " : " npm:*"
172+ languageName : unknown
173+ linkType : soft
174+
167175" @testrepo/with-dev-deps@workspace:packages/with-dev-deps " :
168176 version : 0.0.0-use.local
169177 resolution : " @testrepo/with-dev-deps@workspace:packages/with-dev-deps"
Original file line number Diff line number Diff line change 3434 exit 1
3535fi
3636
37+ # Build from standalone package folder using `rescript build`
38+ bold " Test: Standalone package can build via rescript from package folder"
39+ pushd ./packages/standalone > /dev/null
40+ error_output=$( rescript build 2>&1 )
41+ if [ $? -eq 0 ];
42+ then
43+ success " Standalone package built"
44+ else
45+ error " Error building standalone package"
46+ printf " %s\n" " $error_output " >&2
47+ popd > /dev/null
48+ exit 1
49+ fi
50+ popd > /dev/null
51+
3752node ./packages/main/src/Main.mjs > ./packages/main/src/output.txt
3853
3954mv ./packages/main/src/Main.res ./packages/main/src/Main2.res
You can’t perform that action at this time.
0 commit comments