Skip to content

Commit 90c65a2

Browse files
ef4RobbieTheWagner
authored andcommitted
Process typescript (#13)
This apparently works just fine. The YUIDoc parser doesn't see to care about the typescriptisms.
1 parent 86b0568 commit 90c65a2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/broccoli/generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const generateYuiDocJsonApi = require('../preprocessors/generate-yuidoc-jsonapi'
99
module.exports = class DocsGenerator extends CachingWriter {
1010
constructor(inputNodes, options) {
1111
let defaults = {
12-
cacheInclude: [/\.js$/]
12+
cacheInclude: [/\.(js|ts)$/],
1313
};
1414

1515
super(inputNodes, Object.assign(defaults, options));

lib/preprocessors/generate-yuidoc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function normalizePath(filePath, inputPath) {
9393
return filePath
9494
.replace(inputPath, '') // Remove root of path
9595
.replace(/\\/g, '/') // Convert windows-style slashes
96-
.replace(/(\/index)?\.js/, ''); // Remove index.js / .js
96+
.replace(/(\/index)?\.[jt]s/, ''); // Remove index.js / .js
9797
}
9898

9999
function isAcceptableWarning(warning) {
@@ -102,6 +102,7 @@ function isAcceptableWarning(warning) {
102102

103103
module.exports = function generateYUIDoc(inputPaths, project) {
104104
let json = new YUIDoc({
105+
extension: '.js,.ts',
105106
quiet: true,
106107
writeJSON: false,
107108
paths: inputPaths,

0 commit comments

Comments
 (0)