Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions addon/components/api/x-class/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ import { computed } from '@ember/object';
import { or } from '@ember/object/computed';
import { capitalize } from '@ember/string';
import { memberFilter } from '../../../utils/computed';
import config from 'dummy/config/environment';

const { showImportPaths } = config['ember-cli-addon-docs'];

import layout from './template';

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

showImportPaths,

showInherited: false,
showProtected: false,
showPrivate: false,
Expand Down
2 changes: 1 addition & 1 deletion addon/components/api/x-class/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{! wrapping in a div seems to work around https://github.com/ember-learn/ember-cli-addon-docs/issues/7 }}
<div data-test-class-description>{{{class.description}}}</div>

{{#if (or class.exportType hasToggles)}}
{{#if (or (and class.exportType showImportPaths) hasToggles)}}
{{#api/x-meta-panel as |panel|}}
{{#if class.exportType}}
{{#panel.header}}
Expand Down
5 changes: 5 additions & 0 deletions addon/components/api/x-section/component.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Component from '@ember/component';
import { computed } from '@ember/object';
import layout from './template';
import config from 'dummy/config/environment';

const { showImportPaths } = config['ember-cli-addon-docs'];

/**
@class Api/XSection
Expand All @@ -10,6 +13,8 @@ export default Component.extend({
layout,
tagName: '',

showImportPaths,

/**
* Params shouldn't be displayed when there are no descriptions and no subparams,
* because the information is already displayed in the type signature and redundant
Expand Down
2 changes: 1 addition & 1 deletion addon/components/api/x-section/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{{item.description}}}
</p>

{{#if (or item.exportType shouldDisplayParams)}}
{{#if (or (and item.exportType showImportPaths) shouldDisplayParams)}}
{{#api/x-meta-panel as |panel|}}
{{#if item.exportType}}
{{#panel.header}}
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ module.exports = {
primaryBranch: userConfig.getPrimaryBranch(),
latestVersionName: LATEST_VERSION_NAME,
deployVersion: 'ADDON_DOCS_DEPLOY_VERSION',
searchTokenSeparator: "\\s+"
searchTokenSeparator: "\\s+",
showImportPaths: true
},
'ember-component-css': {
namespacing: false
Expand Down