sourcejs / sourcejs-spec-status

Spec status - Sourcejs plugin for defining documentation page (spec) status of implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spec Status

Gitter chat

SourceJS plugin for Spec Statuses. Define the state of specific spec page with dev, rec, ready, deprecated or any custom badges.

image

It's also possible to assign different statuses to subsections of the Spec by adding corresponding status-class to source section, e.g.:

<div class="source_section status-deprecated">

Installation

Set-up required dependencies for the plugin.

Then install plugin to SourceJS running npm in sourcejs/user folder:

npm install sourcejs-spec-status --save

Update build

cd sourcejs
npm run build

Or if you're using sourcejs-npm set-up:

cd node_modules/sourcejs
npm run build

After build is finished, open any spec in enabled catalogue and check the header source_info section.

Options

Define plugin options in sourcejs/user/options.js file:

assets: {
  pluginsOptions: {
    specStatus: {
      enabledCatalogs: ['specs']
    },
  }
}

Dependencies

CouchDB

Install it, run locally or remotely and configure your SourceJS in /user/options.js:

assets: {
  modulesOptions: {
    couch: {
      server: 'http://custom-couch-db.url:5984' // Defaults to http://127.0.0.1:5984
    },
  }
}

Note: CouchDB must be configured to allow CORS. Change database configuration from file, or use integrated admin panel - http://127.0.0.1:5984/_utils/config.html.

Upcoming updates

  • Change database solution to SourceJS storage

Compatible with SourceJS v0.4+, for v0.3.* use previous release.

FAQ

Entry JS file is not loaded

If you get a similar 404 loading error for sourcejs-spec-status.js as in this issue, then re-check if you have re-build SourceJS engine assets with npm run build.

About

Spec status - Sourcejs plugin for defining documentation page (spec) status of implementation.

License:MIT License


Languages

Language:JavaScript 54.5%Language:CSS 45.5%