How to use ember-cli-addon-docs - 10 common examples

To help you get started, we’ve selected a few ember-cli-addon-docs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ember-animation / ember-animated / tests / dummy / app / pods / index / utils / animated-code-diff / component.js View on Github external
function highlightLineObjects(lineObjects, language) {
  let code = lineObjects.map(lineObject => lineObject.text).join('\n');
  let highlightedCode = highlightCode(code, language);

  return highlightedCode.split('\n').map((text, index) => ({
    id: lineObjects[index].id,
    highlighted: lineObjects[index].highlighted,
    // htmlSafe is justified here because we generated the highlighting markup
    // ourself in highlightCode
    text: htmlSafe(text === "" ? "\n" : text),
  }));
}
github Cropster / ember-visual-test / tests / dummy / app / models / module.js View on Github external
import BaseModule from 'ember-cli-addon-docs/models/module';
import { get } from '@ember/object';
import fixWindowsPath from 'dummy/utils/fix-windows-path';

export default BaseModule.extend({

  init() {
    // On Windows, IDs might be wrong (coming from Yuidoc)
    // Since we can't change the ID, we make a copy of the record with the fixed ID
    let id = get(this, 'id');
    if (id && id.startsWith('C:')) {
      this._copyForId();
    }

    this._super(...arguments);
  },

  _copyForId() {
    // Fix IDs on Windows
    let { id, file, functions, variables, classes, components } = this;
github dunkinbase / ember-elements / tests / dummy / app / router.js View on Github external
import config from './config/environment';
import AddonDocsRouter, { docsRoute } from 'ember-cli-addon-docs/router';
const Router = AddonDocsRouter.extend( {
  location: config.locationType,
  rootURL: config.rootURL,
} );
Router.map( function () {
  docsRoute( this, function () { /* Your docs routes go here */

    this.route( 'core', function () {
      this.route( 'button' );
      this.route( 'button-group' );
      this.route( 'card' );
      this.route( 'icon' );
      this.route( 'dialog' );
      this.route( 'pop-over' );
      this.route( 'panel-stack' );
      this.route( 'tag-input' );
      this.route( 'db-tree' );
github ember-graphql / ember-apollo-client / tests / dummy / app / router.js View on Github external
import AddonDocsRouter, { docsRoute } from 'ember-cli-addon-docs/router';
import config from './config/environment';

const Router = AddonDocsRouter.extend({
  location: config.locationType,
  rootURL: config.rootURL,
});

Router.map(function() {
  docsRoute(this, function() {
    /* Your docs routes go here */
  });

  this.route('characters');
  this.route('luke');
  this.route('anakin');
  this.route('new-review');

  this.route('not-found', { path: '/*path' });
});
github ember-animation / ember-animated / tests / dummy / app / pods / index / controller.js View on Github external
function highlightLineObjects(lineObjects, language) {
  let code = lineObjects.map(lineObject => lineObject.text).join('\n');
  let highlightedCode = highlightCode(code, language);

  return highlightedCode.split('\n').map((text, index) => ({
    id: lineObjects[index].id,
    highlighted: lineObjects[index].highlighted,
    text: text === "" ? "\n" : text,
  }));
}
github miguelcobain / ember-yeti-table / tests / dummy / app / router.js View on Github external
import AddonDocsRouter, { docsRoute } from 'ember-cli-addon-docs/router';
import RouterScroll from 'ember-router-scroll';
import config from './config/environment';

const Router = AddonDocsRouter.extend(RouterScroll, {
  location: config.locationType,
  rootURL: config.rootURL
});

Router.map(function() {
  docsRoute(this, function() {
    this.route('quickstart');
    this.route('why-yeti-table');
    this.route('general');
    this.route('sorting');
    this.route('filtering');
    this.route('pagination');
    this.route('async');
    this.route('styling');
    this.route('configuration');
  });
github Cropster / ember-visual-test / tests / dummy / app / router.js View on Github external
import AddonDocsRouter, { docsRoute } from 'ember-cli-addon-docs/router';
import config from './config/environment';

const Router = AddonDocsRouter.extend({
  location: config.locationType,
  rootURL: config.rootURL,
});

Router.map(function() {
  this.route('interactive');
  this.route('visual-test-route');

  docsRoute(this, function () {
    this.route('how');
    this.route('mirage');
    this.route('platforms');
    this.route('styles');
    this.route('tech');
    this.route('example');
    this.route('not-found', { path: '/*path' });
github LevelbossMike / ember-statecharts / tests / dummy / app / router.js View on Github external
import AddonDocsRouter, { docsRoute } from 'ember-cli-addon-docs/router';
import config from './config/environment';

const Router = AddonDocsRouter.extend({
  location: config.locationType,
  rootURL: config.rootURL,
});

Router.map(function() {
  docsRoute(this, function() {
    this.route('tutorial');
    this.route('login-form');
    this.route('statecharts');
  });
  this.route('editor');
});

export default Router;
github miragejs / ember-cli-mirage / tests / dummy / app / router.js View on Github external
import AddonDocsRouter, { docsRoute } from 'ember-cli-addon-docs/router';
import config from './config/environment';

const Router = AddonDocsRouter.extend({
  location: config.locationType,
  rootURL: config.rootURL
});

Router.map(function() {
  docsRoute(this, function() {
    this.route('getting-started', function() {
      this.route('what-is-mirage');
      this.route('installation');
      this.route('upgrade-guide');
      this.route('overview');
    });

    this.route('route-handlers', function() {
      this.route('functions');
      this.route('shorthands');
github concordnow / ember-content-loader / tests / dummy / app / router.js View on Github external
import AddonDocsRouter, { docsRoute } from 'ember-cli-addon-docs/router';
import config from './config/environment';

const Router = AddonDocsRouter.extend({
  location: config.locationType,
  rootURL: config.rootURL,
});

Router.map(function() {
  docsRoute(this, function() {
    this.route('usage');
    this.route('examples');
    this.route('known-issues');
  });
  this.route('not-found', { path: '/*path' });
});

export default Router;