Skip to content

Commit

Permalink
add compatibility for next.conf.ts file
Browse files Browse the repository at this point in the history
  • Loading branch information
xavimondev committed Jul 21, 2024
1 parent 694deed commit 5a7d36a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# seo-ai

## 0.4.0

### Minor Changes

- add compatibility for next.config.ts

## 0.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "seo-ai",
"version": "0.3.2",
"version": "0.4.0",
"description": "Command-line tool to generate SEO metadata and HTML meta tags using AI models",
"type": "module",
"license": "MIT",
Expand Down
7 changes: 6 additions & 1 deletion src/commands/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ export const generate = new Command()
const pwd = path.resolve(process.cwd())
const nextMjsFile = path.join(pwd, 'next.config.mjs')
const nextJsFile = path.join(pwd, 'next.config.js')
if ((existsSync(nextMjsFile) || existsSync(nextJsFile)) && !opts.html) {
// next-canary
const nextTsFile = path.join(pwd, 'next.config.ts')
if (
(existsSync(nextMjsFile) || existsSync(nextJsFile) || existsSync(nextTsFile)) &&
!opts.html
) {
isMetadata = true
}

Expand Down

0 comments on commit 5a7d36a

Please sign in to comment.