How to use the ember-cli-addon-docs/utils/computed.addonLogo function in ember-cli-addon-docs

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-learn / ember-cli-addon-docs / addon / components / docs-viewer / x-nav / component.js View on Github external
import layout from './template';
import config from 'ember-get-config';
import { classify } from '@ember/string';
import { addonLogo } from 'ember-cli-addon-docs/utils/computed';

const projectName = config['ember-cli-addon-docs'].projectName;

export default Component.extend({
  layout,
  tagName: '',

  root: 'docs',

  store: service(),

  addonLogo: addonLogo(projectName),

  addonTitle: computed('addonLogo', function() {
    let logo = this.get('addonLogo');

    return classify(projectName.replace(`${logo}-`, ''));
  }),

  /*
    This is overwritten for the Sandbox.
  */
  project: computed(function() {
    return this.get('store').peekRecord('project', projectName);
  })
});
github ember-learn / ember-cli-addon-docs / addon / components / docs-header / component.js View on Github external
export default Component.extend({
  layout,
  tagName: '',

  projectVersion: service(),

  projectHref,
  latestVersionName,

  didInsertElement() {
    this._super(...arguments);

    this.get('projectVersion').loadAvailableVersions();
  },

  logo: classify(addonLogo(projectName)),

  /**
    The prefix of your project, typically "Ember", "EmberCLI" or "EmberData".

    By default the prefix will be autodiscovered from the `name` field of your addon's package.json.

    ```hbs
    {{docs-header prefix='EmberData'}}
    ```

    @argument prefix
    @type String?
  */
  prefix: addonPrefix(projectName),

  /**