html-sketchapp-cli
html-sketchapp-cli copied to clipboard
Export works, not importing into Sketch
Hey, saw Mark's talk featured at React Amsterdam and was psyched to try this.
I'm able to export Sketch JSON file, but they don't import anything into Sketch.
I tried using Styled Components, CSS-based, and I even just copied the HTML/CSS/JS from the seek-oss master component page and nothing imports into Sketch (no new libraries under New Symbol).
Here is a link to my example repo. I setup a basic Gatsby project (to generate the static HTML from React components), and use gatsby build to generate HTML from the pages/component.js file (with a list of components, wrapped in divs with data-attributes). Running npm run sketch:build targets the static component HTML file and generates the Sketch JSON into the /sketch/ folder (you can find my exports there).
Not sure how to debug this further since the generated/exported JSON looks accurate, the Sketch plugin just isn't pulling it in correctly. Not sure if this should be in the html-sketchapp repo in that case? I can definitely cross-post this there as well.
Process
- Generate Sketch JSON (either from custom HTML or seek-oss boilerplate).
- Open Sketch, create new document.
- Go to Plugins > From Almost > Import files
- Pick files
- Nothing happens?
Specs
- OSX 10.13.6
- Sketch 52.5
I'm getting a similar issue. If I try to import both document.asketch.json and page.asketch.json then nothing happens. If I only import page.asketch.json then I get symbols. It seems to be the document styles that aren't working.
Did anyone found a way to make it work? I'm having the same issue, also with Sketch 52.5.
@danielkatz : I have it working now after upgrading to v.4.2.0 of the asketch2sketch plugin: https://github.com/brainly/html-sketchapp/releases/tag/v4.2.0