html-sketchapp-cli icon indicating copy to clipboard operation
html-sketchapp-cli copied to clipboard

Export works, not importing into Sketch

Open whoisryosuke opened this issue 6 years ago • 3 comments

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

  1. Generate Sketch JSON (either from custom HTML or seek-oss boilerplate).
  2. Open Sketch, create new document.
  3. Go to Plugins > From Almost > Import files
  4. Pick files
  5. Nothing happens?

Specs

  • OSX 10.13.6
  • Sketch 52.5

whoisryosuke avatar Apr 13 '19 19:04 whoisryosuke

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.

estr avatar Apr 30 '19 02:04 estr

Did anyone found a way to make it work? I'm having the same issue, also with Sketch 52.5.

danielkatz avatar Jun 06 '19 15:06 danielkatz

@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

estr avatar Jun 15 '19 03:06 estr