pomber / code-surfer

Rad code slides <🏄/>
https://codesurfer.pomb.us/
MIT License
6.36k stars 174 forks source link

Usage in nextjs app withouth mdx deck #90

Open hardvain opened 4 years ago

hardvain commented 4 years ago

Hello, Is it possible to use this in a nextjs app preferably without the dependency of mdx-deck? I am fine with adding mdx deck as well but I was not able to get it work with nextjs app

pomber commented 4 years ago

You could try to use the @code-surfer/standalone package, but it isn't documented. There are some usage examples here: https://github.com/pomber/code-surfer/tree/master/sites/book/src

(for something more ambitious wait for https://github.com/code-hike/codehike)

JakubKoralewski commented 4 years ago

I'm getting this error after adding @code-surfer/standalone as a dev dependency :confused::


error - ./node_modules/@code-surfer/themes/dist/themes.esm.js
Module not found: Can't resolve 'theme-ui' in '.\node_modules\@code-surfer\themes\dist'
Error: Cannot find module 'theme-ui'

EDIT: Installing theme-ui fixed the problem 😅

Although I'm having issues styling the code. The code elements seems to be scaled using transform is there a way to disable this?