Lona / Lona

A tool for defining design systems and using them to generate cross-platform UI code, Sketch files, and other artifacts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building and Running Development Version of Lona Compiler

509dave16 opened this issue · comments

Building and Running Development Version of Lona Compiler

Hey, @dabbott . I have just started tinkering around with Lona. And I was wanting to test the export of components to React Native. I tried following the steps outlined under the sub package for building the lona compiler: https://github.com/airbnb/Lona/tree/master/compiler/core

I have run npm run build, but there's no lonac executable in the compiler/core/node_modules/.bin/ of the Lona project that I cloned. In the resulting build folder their are some javascript files. But trying to run them with node doesn't work.

If you could show me how to do it or clarify what's going on that would be great! Would love to be able to add these instructions to the README for the compiler/core.

Hoping to maybe sometime in the near future help to add new UI components to the Lona editor. Like button, list, etc...

Really excited to see where you take Lona!

Hey @509dave16! You can use node src/main.bs.js instead of lonac to run the development version. lonac is only for the prod version published on npm.

I just updated the docs to make that more clear. For a more concrete example for React Native, check out the package.json scripts: https://github.com/airbnb/Lona/blob/b362f7102bb245676e6b3dff4065d70a9975ff0a/compiler/core/package.json#L21

@dabbott Thank you! I had seen those npm scripts, but I mistook them for some kind of jest snapshot testing. Really appreciate the time you took to get back to me. I'll go ahead and close this. Thanks again for your help!!