Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

ReScript v12 js-post-build confusion

$
0
0

Of course, this is our config in rescript.json:

"js-post-build": {
  "cmd": "./tools/gen.sh"
},

And the gen.sh file expects a single argument to be passed to it which is the path to the JS file that was generated by the rescript compiler. This is a relative path in the ReScript v11 build system. It’s impossible for me to know to what the path is relative – but if I had to guess, I’d say it’s relative to node_modules/rescript/. All I know is that it starts with ../../.

We use this script to compile a Flow types file from the @genType-generated TypeScript file. This is crucial for us to move forward with our rescript codebase without breaking important business features in our legacy flowtyped JS codebase.


Viewing all articles
Browse latest Browse all 2592

Trending Articles