Skip to content

Commit

Permalink
Merge pull request #43 from outerbase/support-windows
Browse files Browse the repository at this point in the history
Support Windows
  • Loading branch information
Brayden authored Aug 17, 2024
2 parents b850831 + a9c1828 commit 39ec84e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
23 changes: 23 additions & 0 deletions copy-handlebars.js
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.');
14 changes: 0 additions & 14 deletions copy-handlebars.sh

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"scripts": {
"compile": "tsc --project ./tsconfig.json",
"build": "npm run compile && ./copy-handlebars.sh",
"build": "npm run compile && node copy-handlebars.js",
"publish-npm-module": "npm publish --access public",
"prepack": "npm run build",
"prepare": "husky install",
Expand Down

0 comments on commit 39ec84e

Please sign in to comment.