New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@primer/blueprints

Package Overview
Dependencies
Maintainers
5
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@primer/blueprints

Components for GitHub Documentation Sites

  • 0.0.0-a97effe
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
113
increased by82.26%
Maintainers
5
Weekly downloads
 
Created
Source

Primer Blueprints

This project hosts React components and utilities for building Primer documentation sites.

:point_right: Visit primer.style/blueprints to learn more!

Installation

npm install @primer/blueprints react react-dom styled-components

Usage

Wrap your configuration in the @primer/blueprints/configure export in your project's next.config.js:

const configure = require('@primer/blueprints/configure')
module.exports = configure({
  env: {
    // your env vars here
  }
})

Now v2

When deploying to Now v2, be sure to provide the target: 'serverless' configuration option:

module.exports = configure({
+  target: 'serverless', // required for Now v2
  env: {
    // your env vars here
  }
})

Configuration features

Our configuration provides the following features:

  1. Conversion of .svg files into React components with svgr, as in:

    import SomeImage from '../assets/some-image.svg'
    export default props => <SomeImage width="100%" {...props} />
    
  2. Export of bitmap images (.gif, .jpg, .png, and .ico) as static files with file-loader:

    import myImagePath from '../assets/image.gif'
    export default props => <img src={myImagePath} {...props} />
    
  3. MDX support, plus a bunch of other goodies:

Components

General-purpose React components are available as named exports from @primer/blueprints:

import {Header, ClipboardCopy, StatusLabel} from '@primer/blueprints'

Next.js components

React components for use in Next.js sites are only exported from @primer/blueprints/next-components:

import {Link, Frame, CodeExample} from '@primer/blueprints/next-components'

Keywords

FAQs

Package last updated on 20 Jun 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