How to use the bs-platform/lib/js/list.js.map function in bs-platform

To help you get started, we’ve selected a few bs-platform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mpaiva / tokenizer / src / CLI.bs.js View on Github external
function buildTypography(typographyDir) {
  console.log("Building Typography Variables");
  console.log("Reading data from " + typographyDir);
  var dir = List.hd(List.filter((function (file) {
                return +(file !== "page.json");
              }))($$Array.to_list(Fs.readdirSync(typographyDir))));
  var typos = List.map((function (json) {
          return /* record */[
                  /* name */Caml_array.caml_array_get(Json_decode.field("overrideValues", (function (param) {
                              return Json_decode.array((function (param) {
                                            return Json_decode.field("value", Json_decode.string, param);
                                          }), param);
                            }), json), 0),
                  /* value */Caml_array.caml_array_get(Json_decode.field("overrideValues", (function (param) {
                              return Json_decode.array((function (param) {
                                            return Json_decode.field("value", Json_decode.string, param);
                                          }), param);
                            }), json), 1)
                ];
        }), List.map(Json.parseOrRaise, List.map((function (file) {
                  return Fs.readFileSync(typographyDir + ("/" + (dir + ("/" + file))), "utf8");
                }), List.filter((function (file) {
                        return +(file !== "artboard.json");
github mpaiva / tokenizer / src / CLI.bs.js View on Github external
console.log("Building Color Variables!");
  console.log("Reading data from " + colorsDir);
  var clrs = List.map((function (json) {
          return /* record */[
                  /* name */Caml_array.caml_array_get(Json_decode.field("overrideValues", (function (param) {
                              return Json_decode.array((function (param) {
                                            return Json_decode.field("value", Json_decode.string, param);
                                          }), param);
                            }), json), 0),
                  /* hex */Caml_array.caml_array_get(Json_decode.field("overrideValues", (function (param) {
                              return Json_decode.array((function (param) {
                                            return Json_decode.field("value", Json_decode.string, param);
                                          }), param);
                            }), json), 1)
                ];
        }), List.map(Json.parseOrRaise, List.map((function (file) {
                  return Fs.readFileSync(colorsDir + ("/" + file), "utf8");
                }), List.filter((function (file) {
                        if (file !== "page.json") {
                          return +file.includes(".json");
                        } else {
                          return /* false */0;
                        }
                      }))($$Array.to_list(Fs.readdirSync(colorsDir))))));
  return /* Colors */Block.__(0, [clrs]);
}
github mpaiva / tokenizer / src / CLI.bs.js View on Github external
return +(file !== "page.json");
              }))($$Array.to_list(Fs.readdirSync(typographyDir))));
  var typos = List.map((function (json) {
          return /* record */[
                  /* name */Caml_array.caml_array_get(Json_decode.field("overrideValues", (function (param) {
                              return Json_decode.array((function (param) {
                                            return Json_decode.field("value", Json_decode.string, param);
                                          }), param);
                            }), json), 0),
                  /* value */Caml_array.caml_array_get(Json_decode.field("overrideValues", (function (param) {
                              return Json_decode.array((function (param) {
                                            return Json_decode.field("value", Json_decode.string, param);
                                          }), param);
                            }), json), 1)
                ];
        }), List.map(Json.parseOrRaise, List.map((function (file) {
                  return Fs.readFileSync(typographyDir + ("/" + (dir + ("/" + file))), "utf8");
                }), List.filter((function (file) {
                        return +(file !== "artboard.json");
                      }))($$Array.to_list(Fs.readdirSync(typographyDir + ("/" + dir)))))));
  return /* Typography */Block.__(1, [typos]);
}