create-lupine 1.0.8 → 1.0.10
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/index.js +24 -4
- package/package.json +1 -1
- package/templates/cv-starter/web/markdown/en/index.md +4 -0
- package/templates/cv-starter/web/markdown/zh/index.md +4 -0
- package/templates/cv-starter/web/src/markdown-built/en/index.html +2 -0
- package/templates/cv-starter/web/src/markdown-built/zh/index.html +2 -0
package/index.js
CHANGED
|
@@ -4,6 +4,20 @@ import fs from 'node:fs';
|
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import crypto from 'node:crypto';
|
|
7
|
+
import { execSync } from 'node:child_process';
|
|
8
|
+
|
|
9
|
+
function getLatestVersion(pkgName, fallback) {
|
|
10
|
+
try {
|
|
11
|
+
const version = execSync(`npm view ${pkgName} version`, {
|
|
12
|
+
encoding: 'utf8',
|
|
13
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
14
|
+
timeout: 3000,
|
|
15
|
+
}).trim();
|
|
16
|
+
return version ? `^${version}` : fallback;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
return fallback;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
7
21
|
|
|
8
22
|
function generateRandomString(length) {
|
|
9
23
|
const chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_!@&?-#$';
|
|
@@ -183,15 +197,21 @@ async function init() {
|
|
|
183
197
|
},
|
|
184
198
|
};
|
|
185
199
|
|
|
200
|
+
console.log('Fetching latest versions...');
|
|
201
|
+
const latestApi = getLatestVersion('lupine.api', '^1.0.1');
|
|
202
|
+
const latestWeb = getLatestVersion('lupine.web', '^1.0.1');
|
|
203
|
+
const latestComponents = getLatestVersion('lupine.components', '^1.0.1');
|
|
204
|
+
const latestPress = getLatestVersion('lupine.press', '^1.0.1');
|
|
205
|
+
|
|
186
206
|
pkg.dependencies = {
|
|
187
|
-
'lupine.api':
|
|
188
|
-
'lupine.components':
|
|
189
|
-
'lupine.web':
|
|
207
|
+
'lupine.api': latestApi,
|
|
208
|
+
'lupine.components': latestComponents,
|
|
209
|
+
'lupine.web': latestWeb,
|
|
190
210
|
};
|
|
191
211
|
|
|
192
212
|
const templateObj = TEMPLATES.find((t) => t.name === template);
|
|
193
213
|
if (templateObj && templateObj.needsPress) {
|
|
194
|
-
pkg.dependencies['lupine.press'] =
|
|
214
|
+
pkg.dependencies['lupine.press'] = latestPress;
|
|
195
215
|
pkg.devDependencies['gray-matter'] = '^4.0.3';
|
|
196
216
|
pkg.devDependencies['marked'] = '^17.0.1';
|
|
197
217
|
pkg.scripts['cp-docs'] = `node dev/cp-folder.js dist/server_root/${appName}_web/github-pj-name docs`;
|
package/package.json
CHANGED
|
@@ -35,3 +35,7 @@ A problem-solver at heart with strong collaborative and communication skills. Co
|
|
|
35
35
|
- **Location**: Auckland / Remote
|
|
36
36
|
- **Availability**: 4 weeks notice
|
|
37
37
|
- **Visa Status**: NZ Resident / Work Visa
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
Powered by [Lupine.js](https://github.com/uuware/lupine.js). If you find this template helpful, a star on GitHub is always appreciated ⭐️
|
|
@@ -16,3 +16,5 @@
|
|
|
16
16
|
<li><strong>Availability</strong>: 4 weeks notice</li>
|
|
17
17
|
<li><strong>Visa Status</strong>: NZ Resident / Work Visa</li>
|
|
18
18
|
</ul>
|
|
19
|
+
<hr>
|
|
20
|
+
<p>Powered by <a href="https://github.com/uuware/lupine.js">Lupine.js</a>. If you find this template helpful, a star on GitHub is always appreciated ⭐️</p>
|