instaserve 1.1.16 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/instaserve +12 -0
- package/package.json +1 -1
package/instaserve
CHANGED
|
@@ -101,6 +101,18 @@ if (args[0] === 'generate-routes') {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
const sourcePublic = path.join(__dirname, 'public')
|
|
105
|
+
|
|
106
|
+
if (fs.existsSync(sourcePublic)) {
|
|
107
|
+
const destPublic = path.join(process.cwd(), 'public')
|
|
108
|
+
try {
|
|
109
|
+
fs.cpSync(sourcePublic, destPublic, { recursive: true })
|
|
110
|
+
console.log(chalk.green(`✓ Created/Updated public/`))
|
|
111
|
+
} catch (e) {
|
|
112
|
+
console.error(chalk.red(`! Failed to copy public/: ${e.message}`))
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
104
116
|
process.exit(0)
|
|
105
117
|
}
|
|
106
118
|
|