datacardsplaybook icon indicating copy to clipboard operation
datacardsplaybook copied to clipboard

Create a Template JS File

Open andrewzaldivar opened this issue 2 years ago • 1 comments

As mentioned in #16, to improve clarity on how to run the Card Builder, especially when one wants to build a Data Card from a MD file, a template MD and HTML file that runs the script should be created.

andrewzaldivar avatar Mar 14 '23 23:03 andrewzaldivar

I'd really appreciate a solution to this issue. Although I was able to build the dist directory with the scripts and styles, I was unable to convert a Data Card from Markdown to HTML, based on the README instructions.

Specifically, putting the code for conversion inside a file New.js and trying to run this as node New.js resulted in the following error

/home/bram/NS/TL/datacardsplaybook/labs/card-builder/dist/New.js:2
CardBuilder.markdownToHTMLCard(markdown);
^

ReferenceError: CardBuilder is not defined
    at Object.<anonymous> (/home/bram/NS/TL/datacardsplaybook/labs/card-builder/dist/New.js:2:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47

bramzandbelt avatar Mar 20 '23 10:03 bramzandbelt