Skip to content

Commit

Permalink
Lazily require ember-cli-addon-docs-yuidoc when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
nlepage authored and dbendaou committed Aug 10, 2022
1 parent 44fe13f commit 86eac37
Showing 1 changed file with 6 additions and 1 deletion.
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, overrideEnvironment, findEnvironment } = 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

0 comments on commit 86eac37

Please sign in to comment.