Skip to content

Commit

Permalink
fix: handle both js and ts extensions
Browse files Browse the repository at this point in the history
Fixes #18
  • Loading branch information
NagariaHussain committed May 8, 2023
1 parent 77528c9 commit 9e54b21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doppio/commands/spa_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ def setup_tailwindcss(self):
create_file(index_css_path, INDEX_CSS_BOILERPLATE)

# Populate content property in tailwind config file
# the extension of config can be .js or .ts, so we need to check for both
tailwind_config_path: Path = self.spa_path / "tailwind.config.js"
if not tailwind_config_path.exists():
tailwind_config_path = self.spa_path / "tailwind.config.ts"

tailwind_config_path: Path = self.spa_path / "tailwind.config.js"
tailwind_config = tailwind_config_path.read_text()
tailwind_config = tailwind_config.replace(
Expand Down

0 comments on commit 9e54b21

Please sign in to comment.