@patternplate/api

3.2.5 • Public • Published

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.2.50latest
3.2.140next
3.0.7-10canary
2.6.2-00testing

Version History

VersionDownloads (Last 7 Days)Published
3.2.140
3.2.130
3.2.120
3.2.110
3.2.103
3.2.90
3.2.80
3.2.70
3.2.50
3.2.40
3.1.11
3.0.7-10
3.0.7-00
3.0.60
3.0.40
3.0.30
3.0.20
3.0.10
3.0.00
2.6.2-00
2.6.1-00
2.6.0-00
2.6.0-alpha.384647540
2.6.0-alpha.154b7b630
3.0.0-alpha.00
2.5.252
2.5.210
2.5.190
2.5.180
2.5.170
2.5.160
2.5.150
2.5.140
2.5.130
2.5.105
2.5.90
2.5.60
2.5.50
2.5.20
2.5.10
2.4.02
2.3.10
2.3.00
2.2.00
2.1.60
2.1.40
2.1.30
2.1.20
2.1.10
2.1.00
2.0.120
2.0.100
2.0.90
2.0.80
2.0.40
2.0.30
2.0.20
2.0.10
2.0.00
2.0.0-930
2.0.0-920
2.0.0-910
2.0.0-900
2.0.0-890
2.0.0-880
2.0.0-870
2.0.0-860
2.0.0-850
2.0.0-840
2.0.0-830
2.0.0-820
2.0.0-810
2.0.0-800
2.0.0-790
2.0.0-780
2.0.0-770
2.0.0-760
2.0.0-750
2.0.0-740
2.0.0-730
2.0.0-720
2.0.0-710
2.0.0-700
2.0.0-690
2.0.0-680
2.0.0-670
2.0.0-660
2.0.0-650
2.0.0-630
2.0.0-620
2.0.0-610
2.0.0-600
2.0.0-590
2.0.0-580
2.0.0-570
2.0.0-560
2.0.0-550
2.0.0-540
2.0.0-530
2.0.0-520
2.0.0-510
2.0.0-500
2.0.0-490
2.0.0-480
2.0.0-470
2.0.0-460
2.0.0-450
2.0.0-440
2.0.0-430
2.0.0-420
2.0.0-410
2.0.0-400
2.0.0-390
2.0.0-380
2.0.0-y.00
2.0.0-370
2.0.0-360
2.0.0-350
2.0.0-340
2.0.0-330
2.0.0-320
2.0.0-310
2.0.0-300
2.0.0-290
2.0.0-280
2.0.0-270
2.0.0-2.0.0-26.debug.00
2.0.0-240
2.0.0-230
2.0.0-220
2.0.0-210
2.0.0-190
2.0.0-160
2.0.0-140
2.0.0-130
2.0.0-120
2.0.0-110
2.0.0-90
2.0.0-80
2.0.0-60
2.0.0-50
2.0.0-41
2.0.0-30
2.0.0-00

Package Sidebar

Install

npm i @patternplate/api

Weekly Downloads

14

Version

3.2.5

License

MIT

Unpacked Size

90.5 kB

Total Files

92

Last publish

Collaborators

  • kotzendekrabbe
  • lkuechler
  • rongae
  • marionebl