create-krispya 0.4.0 → 0.4.1
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/dist/cli.cjs +5 -1
- package/dist/cli.mjs +4 -1
- package/dist/index.cjs +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
const module$1 = require('module');
|
|
4
5
|
const process$1 = require('process');
|
|
5
6
|
const index = require('./index.cjs');
|
|
6
7
|
const path = require('path');
|
|
@@ -10,6 +11,7 @@ const p = require('@clack/prompts');
|
|
|
10
11
|
const color = require('chalk');
|
|
11
12
|
const undici = require('undici');
|
|
12
13
|
|
|
14
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
13
15
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
14
16
|
|
|
15
17
|
function _interopNamespaceCompat(e) {
|
|
@@ -27,6 +29,8 @@ function _interopNamespaceCompat(e) {
|
|
|
27
29
|
const p__namespace = /*#__PURE__*/_interopNamespaceCompat(p);
|
|
28
30
|
const color__default = /*#__PURE__*/_interopDefaultCompat(color);
|
|
29
31
|
|
|
32
|
+
const require$1 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cli.cjs', document.baseURI).href)));
|
|
33
|
+
const pkg = require$1("../package.json");
|
|
30
34
|
function getDefaultProjectName(template) {
|
|
31
35
|
const base = index.getBaseTemplate(template);
|
|
32
36
|
switch (base) {
|
|
@@ -408,7 +412,7 @@ async function main() {
|
|
|
408
412
|
'set Node.js version for engines.node field (default: "latest")'
|
|
409
413
|
).option("-y, --yes", "Skip prompts and use default values").action(async (name, options) => {
|
|
410
414
|
console.clear();
|
|
411
|
-
p__namespace.intro(color__default.bgCyan(color__default.black(
|
|
415
|
+
p__namespace.intro(color__default.bgCyan(color__default.black(` create-krispya v${pkg.version} `)));
|
|
412
416
|
let generateOptions;
|
|
413
417
|
if (Object.keys(options).length > 0) {
|
|
414
418
|
const template = options.template ?? "vanilla";
|
package/dist/cli.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
2
3
|
import { cwd } from 'process';
|
|
3
4
|
import { getBaseTemplate, getLatestPnpmVersion, getLatestNodeVersion, getLatestNpmVersion, generate, generateRandomName, getLanguageFromTemplate } from './index.mjs';
|
|
4
5
|
import { join, dirname } from 'path';
|
|
@@ -8,6 +9,8 @@ import * as p from '@clack/prompts';
|
|
|
8
9
|
import color from 'chalk';
|
|
9
10
|
import { fetch } from 'undici';
|
|
10
11
|
|
|
12
|
+
const require$1 = createRequire(import.meta.url);
|
|
13
|
+
const pkg = require$1("../package.json");
|
|
11
14
|
function getDefaultProjectName(template) {
|
|
12
15
|
const base = getBaseTemplate(template);
|
|
13
16
|
switch (base) {
|
|
@@ -389,7 +392,7 @@ async function main() {
|
|
|
389
392
|
'set Node.js version for engines.node field (default: "latest")'
|
|
390
393
|
).option("-y, --yes", "Skip prompts and use default values").action(async (name, options) => {
|
|
391
394
|
console.clear();
|
|
392
|
-
p.intro(color.bgCyan(color.black(
|
|
395
|
+
p.intro(color.bgCyan(color.black(` create-krispya v${pkg.version} `)));
|
|
393
396
|
let generateOptions;
|
|
394
397
|
if (Object.keys(options).length > 0) {
|
|
395
398
|
const template = options.template ?? "vanilla";
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED