Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to target subdirectories in BuckleScript bsconfig.json

I have the following folder structure

--| button
--|--| button.re
main.re

In my bsconfig.json, using the quickstart guide found here. I have in my config the following key/value:

"sources": [
  "src/"
]

It is only targeting the main.re file. I have tried some conventional config options such as *.re, but to no avail. If I would like to target all sub-directories, how would I do so? Thank you.

like image 790
Charlie-Greenman Avatar asked Sep 13 '17 01:09

Charlie-Greenman


Video Answer


2 Answers

There was actually a PR merged just yesterday that adds support for directory traversal. It'll be in the next release, which should be out shortly.

The configuration will then be:

"sources": [{"dir": "src", "subdirs": true}]

Edit: This feature was released in 1.9.2

like image 164
glennsl Avatar answered Oct 19 '22 19:10

glennsl


Looking at documentation the solution would be the following:

"sources": [{"dir": "src", "subdirs": ["button"]}],

Source for documentation: https://bucklescript.github.io/bucklescript/docson/#build-schema.json

like image 29
Charlie-Greenman Avatar answered Oct 19 '22 18:10

Charlie-Greenman