Skip to content

Commit 86eac37

Browse files
nlepagedbendaou
authored andcommitted
Lazily require ember-cli-addon-docs-yuidoc when needed
1 parent 44fe13f commit 86eac37

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
const fs = require('fs');
44
const path = require('path');
5-
const YUIDocsGenerator = require('ember-cli-addon-docs-yuidoc/lib/broccoli/generator');
65
const Funnel = require('broccoli-funnel');
76
const mergeTrees = require('broccoli-merge-trees');
87
const { parse, generatePreviewHead, overrideEnvironment, findEnvironment } = require('./lib/util');
98

9+
let YUIDocsGenerator;
10+
1011
module.exports = {
1112
name: require('./package').name,
1213

@@ -46,6 +47,10 @@ module.exports = {
4647
include: componentFilePathPatterns,
4748
});
4849

50+
if (!YUIDocsGenerator) {
51+
YUIDocsGenerator = require('ember-cli-addon-docs-yuidoc/lib/broccoli/generator');
52+
}
53+
4954
let componentDocsTree = new YUIDocsGenerator([componentJS], {
5055
project: this.project,
5156
destDir: 'storybook-docgen',

0 commit comments

Comments
 (0)