Skip to content

Commit 28deda0

Browse files
committed
drop the dot from the extension
Our transformers and extractors are implemented for `html` for example. However the `path.extname()` returns `.html`. This isn't an issue by default, but it could be for with custom extractors / transformers.
1 parent 2340987 commit 28deda0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cli.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ async function build() {
464464
for (let file of files) {
465465
changedContent.push({
466466
content: fs.readFileSync(path.resolve(file), 'utf8'),
467-
extension: path.extname(file),
467+
extension: path.extname(file).slice(1),
468468
})
469469
}
470470

@@ -726,7 +726,7 @@ async function build() {
726726
chain = chain.then(async () => {
727727
changedContent.push({
728728
content: fs.readFileSync(path.resolve(file), 'utf8'),
729-
extension: path.extname(file),
729+
extension: path.extname(file).slice(1),
730730
})
731731

732732
await rebuild(config)
@@ -738,7 +738,7 @@ async function build() {
738738
chain = chain.then(async () => {
739739
changedContent.push({
740740
content: fs.readFileSync(path.resolve(file), 'utf8'),
741-
extension: path.extname(file),
741+
extension: path.extname(file).slice(1),
742742
})
743743

744744
await rebuild(config)

0 commit comments

Comments
 (0)