Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@operational/styleguide

Package Overview
Dependencies
Maintainers
6
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@operational/styleguide

This project serves as the living styleguide to [@operational/components](https://github.com/contiamo/operational-ui). It is TypeScript-first and uses the [Monaco editor](https://microsoft.github.io/monaco-editor/) that powers [Visual Studio Code](https:/

  • 0.1.2
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
6
Weekly downloads
 
Created
Source

@operational/styleguide

This project serves as the living styleguide to @operational/components. It is TypeScript-first and uses the Monaco editor that powers Visual Studio Code to provide type-safe playgrounds for components, reading them from any given component library.

There's a good chance that you can create a living styleguide for your TypeScript design system with @operational/styleguide.

Getting Started

Here's how you can try out @operational/styleguide.

Prerequisites

This tool uses a source folder as a source of truth. It does not concern itself with the rest of your project, but components that you intend to export are required to be structured the following way inside of any given source folder.

anything-can-happen-outside-of-src
src
├── ComponentName
│   ├── ComponentName.tsx
│   └── README.md
├── OtherComponentName
│   ├── OtherComponentName.tsx
│   └── README.md
└── index.tsx # <- this exports all the components

The reason for this requirement is that we have found that it scales quite well. As with any open source project, this is up for discussion, collaboration and improvement. Open an issue to start collaborating.

Installation

⚠️ These instructions are where we want to be. The src path is not yet configurable.

Install @operational/styleguide by running yarn add @operational/styleguide -D.

Once installed, run yarn operational-styleguide start ./path/to/your/src and you will have a development server up and running. To build your styleguide for production, run yarn operational-styleguide build ./path/to/your/src. The final artifacts will be in a dist folder at your project root, ready to be served.

The ./path/to/your/src defaults to PROJECT_ROOT/src and can be omitted if your project is already structured this way.

For convenience, consider aliasing the operational-styleguide (start, build, etc.) by adding scripts to your package.json.

{
  "name": "@operational/styleguide",
  "scripts": {
+   "start": "operational-styleguide start",
+   "build": "operational-styleguide build",
  }
}

Contributing

We love TypeScript. We love community. Open an issue with whatever's on your mind to start contributing.

FAQs

Package last updated on 17 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc