JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q46155F
  • License MIT

Create and configure a Sourcebit installation

Package Exports

  • create-sourcebit

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (create-sourcebit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

create-sourcebit

npm version

An interactive setup process for Sourcebit

Introduction

Sourcebit uses a configuration file of sourcebit.js to define and configure all of its plugins. While this file can be created manually, this command-line interface provides an interactive setup that gathers enough information about the user's environment and content architecture to create a working configuration.

Every Sourcebit plugin must define the questions that should be asked and process the answers. This takes place via the getSetup and getOptionsFromSetup methods.

Plugin registry

The list of plugins offered by the interactive setup process is pulled from the plugins.json file in the root of the repository. It's an array of objects with the following properties:

  • module (String): The name of the plugin's npm module
    • Example: sourcebit-source-contentful
  • description (String): A human-friendly description of the plugin
    • Example: A Contentful source plugin for Sourcebit
  • author (String): The name/handle of the plugin's author
    • Example: John Doe <john.doe@example.com>
  • type (enum: source|target): The type of plugin
    • Example: source

plugins.json

[
  {
    "module": "/Users/eduardoboucas/Sites/sourcebit-source-contentful",
    "description": "A Contentful source plugin for Sourcebit",
    "author": "Stackbit",
    "type": "source"
  },
  {
    "module": "/Users/eduardoboucas/Sites/sourcebit-target-jekyll",
    "description": "A Sourcebit plugin for Jekyll",
    "author": "Stackbit",
    "type": "target"
  }
]

If you are developing a plugin and you'd like for it to appear on the setup process without having to publish it to npm, you can add it to this array and set the value of module to an absolute path on your filesystem.