question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’m working on Node API. Basically it’d be something like that:

import { build, server, makeWebpackConfig } from 'react-styleguidist';
build({ /* full Styleguidist config */ });
build({ config: 'config file path' });
server({ /* same as above */ });
const config = makeWebpackConfig({ /* same as above */ });

Is that useful? Do you need anything else?

Related issues: #34, #43, #107, #162.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:18 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
sapegincommented, Sep 21, 2016

What @mik01aj suggests in #158 should be possible with this API:

// webpack.config.js
module.exports = [
    { ... user webpack config ...},
    require('react-styleguidist').makeWebpackConfig(),
];
0reactions
sompylasarcommented, Sep 21, 2016

@sapegin What I’ve shown is written once to dynamically provide the component playground with all the components. What I wanted to achieve is to have styleguide descriptors next to the components’ code in the file structure. Unfortunately, webpack cannot do dynamic context-wise requires, so I have to hardcode certain paths which is not nice and prevents from moving this code into the styleguide library so that it can be imported. The component search function is also reused at a separate page that renders complex usecases of each component via render functions (both render and component are defined next to the component code; component is rendered at the atellier stage).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node-API | Node.js v19.3.0 Documentation
Node -API (formerly N-API) is an API for building native Addons. It is independent from the underlying JavaScript runtime (for example, V8) and...
Read more >
What is Node-API? - GitHub Pages
Node -API is a toolkit introduced in Node 8.0.0 that acts as an intermediary between C/C++ code and the Node JavaScript engine.
Read more >
Creating a Secure Node.js REST API - Toptal
In this article, Toptal JavaScript Developer Marcos Henrique da Silva shows how to create a simple and secure REST API for user management...
Read more >
nodejs/node-addon-api: Module for using Node-API from C++
Node -API is an ABI stable C interface provided by Node.js for building native addons. It is independent of the underlying JavaScript runtime...
Read more >
Node - Web APIs | MDN
Chrome Edge Node Full support. Chrome1. footnote. Toggle history Full support. Edge12. Toggle... appendChild Full support. Chrome1. Toggle history Full support. Edge12. Toggle... baseURI Full support....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found