diff --git a/lib/broccoli/generator.js b/lib/broccoli/generator.js index 9685b3e..d131f94 100644 --- a/lib/broccoli/generator.js +++ b/lib/broccoli/generator.js @@ -9,7 +9,7 @@ const generateYuiDocJsonApi = require('../preprocessors/generate-yuidoc-jsonapi' module.exports = class DocsGenerator extends CachingWriter { constructor(inputNodes, options) { let defaults = { - cacheInclude: [/\.js$/] + cacheInclude: [/\.(js|ts)$/], }; super(inputNodes, Object.assign(defaults, options)); diff --git a/lib/preprocessors/generate-yuidoc.js b/lib/preprocessors/generate-yuidoc.js index ec824a0..6a13fe1 100644 --- a/lib/preprocessors/generate-yuidoc.js +++ b/lib/preprocessors/generate-yuidoc.js @@ -93,7 +93,7 @@ function normalizePath(filePath, inputPath) { return filePath .replace(inputPath, '') // Remove root of path .replace(/\\/g, '/') // Convert windows-style slashes - .replace(/(\/index)?\.js/, ''); // Remove index.js / .js + .replace(/(\/index)?\.[jt]s/, ''); // Remove index.js / .js } function isAcceptableWarning(warning) { @@ -102,6 +102,7 @@ function isAcceptableWarning(warning) { module.exports = function generateYUIDoc(inputPaths, project) { let json = new YUIDoc({ + extension: '.js,.ts', quiet: true, writeJSON: false, paths: inputPaths,