Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazily require ember-cli-addon-docs-yuidoc when needed #125

Merged
merged 1 commit into from
Aug 10, 2022
Merged
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
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

const fs = require('fs');
const path = require('path');
const YUIDocsGenerator = require('ember-cli-addon-docs-yuidoc/lib/broccoli/generator');
const Funnel = require('broccoli-funnel');
const mergeTrees = require('broccoli-merge-trees');
const { parse, generatePreviewHead } = require('./lib/util');

let YUIDocsGenerator;

module.exports = {
name: require('./package').name,

Expand Down Expand Up @@ -46,6 +47,10 @@ module.exports = {
include: componentFilePathPatterns,
});

if (!YUIDocsGenerator) {
YUIDocsGenerator = require('ember-cli-addon-docs-yuidoc/lib/broccoli/generator');
}

let componentDocsTree = new YUIDocsGenerator([componentJS], {
project: this.project,
destDir: 'storybook-docgen',
Expand Down