instaserve 1.1.15 → 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 +16 -4
- package/package.json +1 -1
package/instaserve
CHANGED
|
@@ -93,11 +93,23 @@ if (args[0] === 'generate-routes') {
|
|
|
93
93
|
|
|
94
94
|
if (fs.existsSync(sourceLib)) {
|
|
95
95
|
const destLib = path.join(process.cwd(), 'lib')
|
|
96
|
-
|
|
96
|
+
try {
|
|
97
97
|
fs.cpSync(sourceLib, destLib, { recursive: true })
|
|
98
|
-
console.log(chalk.green(`✓ Created lib/`))
|
|
99
|
-
}
|
|
100
|
-
console.
|
|
98
|
+
console.log(chalk.green(`✓ Created/Updated lib/`))
|
|
99
|
+
} catch (e) {
|
|
100
|
+
console.error(chalk.red(`! Failed to copy lib/: ${e.message}`))
|
|
101
|
+
}
|
|
102
|
+
}
|
|
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}`))
|
|
101
113
|
}
|
|
102
114
|
}
|
|
103
115
|
|