styleguide.js | Generate a styleguide from your CSS , by adding YAML data | Generator Utils library
kandi X-RAY | styleguide.js Summary
kandi X-RAY | styleguide.js Summary
Generate a styleguide from your CSS, by adding [YAML] data in the comments. It generates a [self-contained html] file. Works great for component based CSS.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of styleguide.js
styleguide.js Key Features
styleguide.js Examples and Code Snippets
Community Discussions
Trending Discussions on styleguide.js
QUESTION
I've created a few apps that follow the same pattern as the react-microfrontend projects listed on the Single-spa examples page. However, these examples are not using TypeScript.
I am receiving a TS error when App2 tries to import a function that exists in App1, because App2 is unable to find the typings for the App1 object. And this makes sense to me, since the importmap.json
that is referenced in the index.html
file of the root-config project only has a URL listed for the .js file of each microfrontend. I really don't want to add @ts-ignore statements everywhere, and I also don't want to do cross-app communication without being type safe.
An example of what I'm referring to:
This file in the Planets app references the Button component from the Styleguide app. I am unable to build this unless I place a @ts-ignore on the line before the import statement, because my Planets app cannot find the type declarations for Styleguide.
I am very new to import maps and SystemJS in general, so if anyone could point me in the right direction, I'd appreciate it. I've actually gone through the trouble of building my Styleguide as a regular npm library and just including it as a dependency in the Planets package.json file... which kind of defeats the whole purpose of using Single-spa in the first place.
importmap.json
...ANSWER
Answered 2020-Oct-30 at 17:45Unfortunately no, they cannot be shared via the import map because that operates in the browser, and browsers do not understand TypeScript syntax.
Your alternatives are:
- Publish your module's types to an npm registry and
npm install
it into each dependent microfrontend- One caveat here: you will need to update this with every new publish of the shared module, but that can be automated with various tools such as renovate
- Mock the utility module's types
More info can be found at this Github issue: https://github.com/single-spa/single-spa/issues/609#issuecomment-665132965
QUESTION
I'm having an issue where I have a node serve task that watches .hbs files for changes and if a change occurs triggers another node task called 'styleguide'.
This style guide build task is using the node API version of Assemble (v0.23.0).
What's happening is that over time the build task is taking longer and longer to execute until eventually falling over with an error of Out of Memory followed by a JS stacktrace.
Here is the styleguide watch part of the serve task.
...ANSWER
Answered 2017-May-31 at 07:08Running the styleguide task on it's own (rather than as part of npm start
) I saw that the promise wasn't resolving.
So the issue was a couple of things...
First of all: In the 'styleguide' task the error log that gulp plumber should have been providing me was in the wrong spot (below the reject). Pulling everything out and rebuilding it piece by piece showed me this (thanks @doowb)
Second of all: Once I had an error displaying in the console I was able to pin point what was going on. Turns out the reason the task wasn't resolving was because assemble couldn't find a reference to a partial. This led me to my config file where I was setting the partials array and it wasn't including everything I needed.
I feel so silly now but thanks for steering me on the right track.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install styleguide.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page