Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Surfer v3 #58

Merged
merged 170 commits into from
Dec 10, 2019
Merged

Code Surfer v3 #58

merged 170 commits into from
Dec 10, 2019

Conversation

pomber
Copy link
Owner

@pomber pomber commented May 11, 2019

Rewriting Code Surfer from scratch.


Features for v2.0.0:

After v2.0.0:


v2 api looks like this:

import { CodeSurferLayout } from "code-surfer"

# My Deck

---

<CodeSurferLayout>

```js
module.exports = {
  entry: "./path/to/my/entry/file.js",
}
```

```js 4,7 subtitle="Entry and Output"
const path = require("path")

module.exports = {
  entry: "./path/to/my/entry/file.js",
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "my-first-webpack.bundle.js",
  },
}
```

```js 5,7:9
const path = require("path")

module.exports = {
  output: {
    filename: "my-first-webpack.bundle.js",
  },
  module: {
    rules: [{ test: /\.txt$/, use: "raw-loader" }],
  },
}
```

</CodeSurferLayout>

@pomber
Copy link
Owner Author

pomber commented May 16, 2019

It's far from done, but if you wanna try the new version:

$ npm init code-surfer-deck my-deck
$ cd my-deck
$ npm start

@karlhorky
Copy link

Hey, this looks cool! Let me know if I can help with either of the issues that I filed :) I totally understand if you think you're faster by yourself though.

@karlhorky
Copy link

I think I may try upgrading to this version with a slide deck that I'm making right now and seeing whether the things that I'm doing (annotations, splitting) still all work.

@pomber
Copy link
Owner Author

pomber commented May 17, 2019

Hey, this looks cool! Let me know if I can help with either of the issues that I filed :) I totally understand if you think you're faster by yourself though.

Right now the code isn't very stable, I'm still refactoring a lot. So it will be better to wait a bit.

I think I may try upgrading to this version with a slide deck that I'm making right now and seeing whether the things that I'm doing (annotations, splitting) still all work.

This version is like 99% breaking changes, so make sure you have a backup before upgrading :)

src/theming.js Outdated Show resolved Hide resolved
@HoverBaum
Copy link

I have a question on my mind that might fit the context of rewriting: How compatible is CodeSurfer with things other than mdx-deck?

Just curious because the readme only mentions mdx-deck. From looking through components like this for multiple deck frameworks I cam to think that it would be really valuable to have a base component that the community can invest time into and then write adaptors for different frameworks.

@pomber
Copy link
Owner Author

pomber commented May 22, 2019

How compatible is CodeSurfer with things other than mdx-deck?

It's not very well documented, but you can use the current version as a react component anywhere: https://codesurfer.js.org/react-docs/

The reason it's not well documented is because I'm only using it with mdx-deck. But after I finish with v2, I want to use it also for a blog post with gatsby, so the API and docs should be better after that.

@pomber
Copy link
Owner Author

pomber commented Oct 8, 2019

I'll merge this soon. See #70.

@pomber pomber merged commit 0f825b0 into master Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.