Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
})
});
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),
/**