josemarluedke / docfy

Build fully personalized documentation sites; write content and demos in Markdown.
https://docfy.dev
MIT License
75 stars 25 forks source link

preview-component appears to not exist / there is no way to render only with JS #115

Open NullVoxPopuli opened 2 years ago

NullVoxPopuli commented 2 years ago

for example, I wanted this:


```js preview-component
import Title from 'my-library';
import Component from '@glimmer/component';
import { hbs } from 'ember-cli-htmlbars';
import { setComponentTemplate } from '@ember/component';

export default setComponentTemplate(
  hbs`<this.Title />`,
  class extends Component {
    Title = Title;
  },
);
```

But it only renders the code, and doesn't actually invoke <Title />

NullVoxPopuli commented 2 years ago

a reason I want/need this behavior, is because I'd like to be able to have addons provide example components that hack at internal data structures for documentation / demonstration purposes (esp w/r/t design) -- rendering parts of a component is not an option, because those parts are not public API)