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

@patternplate/api

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternplate/api

Patternplate JSON API

  • 2.0.0-55
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
44
decreased by-38.89%
Maintainers
1
Weekly downloads
 
Created
Source

Documentation and development interface for component libraries

@patternplate/api

  • Framework independent
  • Bring design docs to live with real components
  • Powerful search and meta data system

This is the contributor documentation for @patternplate/cli For user docs see patternplate.github.io

About @patternplate/api

@patternplate/api provides an express middleware for use with @patternplate/client, as well as a web socket emitting data about file changes and compilation processes.

Endpoints

  • / - Web socket
  • /state.json - Document and pattern tree
  • /demo/*.html - Demo renderings

WebSocket

The web socket on / emits the following events:

  • {type: "change", "payload": {file: "string", p: conntentType: "pattern" | "doc"}"}
  • {type: "error", "payload": Error"}
  • {type: "start", "payload": {target: "node" | "web"}}
  • {type: "done", "payload": {target: "node" | "web"}}

Quick start

git clone https://github.com/patternplate/patternplate.git
cd patternplate/packages/cli
yarn
yarn start

Usage

const http = require("http");
const api = require("@patternplate/api");

(async () => {
  const server = http.createServer();

  const apiRoute = await api({
    cwd: process.cwd(),
    server
  });

  const app = express().use("/api/", apiRoute)
})();

License

Copyright by SinnerSchrader. All @patternplate packages are released under the MIT license.

FAQs

Package last updated on 12 Mar 2018

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