-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from outerbase/support-windows
Support Windows
- Loading branch information
Showing
3 changed files
with
24 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
// Define the source and destination directories | ||
const srcDir = path.join(__dirname, 'src', 'generators'); | ||
const destDir = path.join(__dirname, 'dist', 'generators'); | ||
|
||
// Create the destination directory if it does not exist | ||
if (!fs.existsSync(destDir)) { | ||
fs.mkdirSync(destDir, { recursive: true }); | ||
} | ||
|
||
// Copy the files from the source to the destination directory | ||
const filesToCopy = ['model-template.handlebars', 'index-template.handlebars']; | ||
|
||
filesToCopy.forEach(file => { | ||
const srcFile = path.join(srcDir, file); | ||
const destFile = path.join(destDir, file); | ||
|
||
fs.copyFileSync(srcFile, destFile); | ||
}); | ||
|
||
console.log('Files copied successfully.'); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters