Skip to content

Commit

Permalink
fix: output json customer templates in the customer directory
Browse files Browse the repository at this point in the history
  • Loading branch information
itsanolive committed Apr 11, 2024
1 parent 92955e2 commit 2b8669c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build/requires/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ const templateOutputPath = path.resolve(ThemeEnvy.outputPath, 'templates')
fs.ensureDirSync(templateOutputPath)
globbedTemplates.forEach(file => {
// write each file to dist
// if the file path includes customers, output into a customers directory in templates
if (file.includes('customers')) {
const customerOutputPath = path.resolve(templateOutputPath, 'customers')
fs.ensureDirSync(customerOutputPath)
fs.copyFileSync(file, path.resolve(customerOutputPath, path.basename(file)))
ThemeEnvy.progress.increment('templates', 1)
return
}
fs.copyFileSync(file, path.resolve(templateOutputPath, path.basename(file)))
// update progress bar
ThemeEnvy.progress.increment('templates', 1)
Expand Down

0 comments on commit 2b8669c

Please sign in to comment.