Skip to content

Commit 33a5d15

Browse files
committed
correctly support hbs, maybe?
1 parent ea4275d commit 33a5d15

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/bin-support.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
const DEFAULT_EXTENSIONS = 'js,ts';
4+
35
async function runTransform(binRoot, transformName, args) {
46
const globby = require('globby');
57
const execa = require('execa');
@@ -17,7 +19,9 @@ async function runTransform(binRoot, transformName, args) {
1719
let jscodeshiftPath = path.dirname(require.resolve('jscodeshift/package'));
1820
let binPath = path.join(jscodeshiftPath, jscodeshiftPkg.bin.jscodeshift);
1921

20-
return execa(binPath, ['-t', transformPath, '--extensions', 'js,ts,hbs', ...foundPaths], {
22+
let extensions = options.extensions || DEFAULT_EXTENSIONS;
23+
24+
return execa(binPath, ['-t', transformPath, '--extensions', extensions, ...foundPaths], {
2125
stdio: 'inherit',
2226
env: {
2327
CODEMOD_CLI_ARGS: JSON.stringify(options),

0 commit comments

Comments
 (0)