@citruslime/create-boilerplate 1.0.0-beta.13 → 1.0.0-beta.14
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/main.mjs
CHANGED
|
@@ -17,10 +17,10 @@ const placeholdersToReplace = {
|
|
|
17
17
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
18
18
|
'[[PACKAGE_NAME]]': '',
|
|
19
19
|
'[[REPOSITORY_ROOT]]': '',
|
|
20
|
+
'[[HUSKY_DIR]]': '',
|
|
20
21
|
'[[BACKEND_PORT]]': 0,
|
|
21
22
|
'[[FRONTEND_PORT]]': 0,
|
|
22
|
-
'
|
|
23
|
-
'/* eslint-enable array-bracket-spacing */': ''
|
|
23
|
+
'\n // eslint-disable-next-line array-bracket-spacing': ''
|
|
24
24
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -202,6 +202,8 @@ async function init () {
|
|
|
202
202
|
|
|
203
203
|
print(lightBlue('Initialising package...'), true);
|
|
204
204
|
|
|
205
|
+
packageDir = packageDir.toString();
|
|
206
|
+
|
|
205
207
|
setReplacements(packageName, rootDir, frontendPort, backendPort);
|
|
206
208
|
prepareDir(join(cwd, packageDir), empty);
|
|
207
209
|
copyTemplate(packageDir);
|
|
@@ -228,6 +230,7 @@ function setReplacements (packageName, rootDir, frontendPort, backendPort) {
|
|
|
228
230
|
|
|
229
231
|
placeholdersToReplace['[[PACKAGE_NAME]]'] = packageName;
|
|
230
232
|
placeholdersToReplace['[[REPOSITORY_ROOT]]'] = rootDir;
|
|
233
|
+
placeholdersToReplace['[[HUSKY_DIR]]'] = join(rootDir, '.husky').replace('\\', '/');
|
|
231
234
|
placeholdersToReplace['[[FRONTEND_PORT]]'] = frontendPort;
|
|
232
235
|
placeholdersToReplace['[[BACKEND_PORT]]'] = backendPort;
|
|
233
236
|
}
|
package/package.json
CHANGED
package/template/vite.config.ts
CHANGED
|
@@ -54,9 +54,8 @@ export default defineConfig({
|
|
|
54
54
|
server: {
|
|
55
55
|
open: true,
|
|
56
56
|
https: true,
|
|
57
|
-
|
|
57
|
+
// eslint-disable-next-line array-bracket-spacing
|
|
58
58
|
port: [[FRONTEND_PORT]],
|
|
59
|
-
/* eslint-enable array-bracket-spacing */
|
|
60
59
|
proxy: {
|
|
61
60
|
'/api': {
|
|
62
61
|
target: 'https://localhost:[[BACKEND_PORT]]',
|