create-packer 1.35.19 → 1.35.21
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/bin/createTemp.js +41 -23
- package/package.json +4 -4
- package/template/cli/biome.json +3 -0
- package/template/lib/workspace/biome.json +3 -0
- package/template/web-app/react-rspack/biome.json +3 -0
- package/template/web-app/react-rspack/package.json +4 -4
- package/template/web-app/react-rspack/rsbuild.config.ts +3 -10
- package/template/web-app/react-vite/biome.json +3 -0
- package/template/web-app/react-webpack/biome.json +3 -0
- package/template/web-app/vue/biome.json +3 -0
- package/template/web-extension/biome.json +3 -0
package/bin/createTemp.js
CHANGED
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
2
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
29
|
exports.createTemp = createTemp;
|
|
4
|
-
const inquirer = require("inquirer");
|
|
5
|
-
const fsExtra = require("fs-extra");
|
|
6
|
-
const path = require("path");
|
|
7
30
|
const chalk = require("chalk");
|
|
8
|
-
const
|
|
31
|
+
const inquirer = __importStar(require("@inquirer/prompts"));
|
|
32
|
+
const fsExtra = __importStar(require("fs-extra"));
|
|
33
|
+
const path = __importStar(require("path"));
|
|
34
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
35
|
const child_process_1 = require("child_process");
|
|
10
36
|
const utils_1 = require("./utils");
|
|
11
37
|
const fs_1 = require("fs");
|
|
@@ -29,27 +55,19 @@ function createTempEnd(output) {
|
|
|
29
55
|
}
|
|
30
56
|
async function createTemp(dirname) {
|
|
31
57
|
const isCurrent = dirname === '.';
|
|
32
|
-
let answer = await inquirer.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
choices: tempInfoList.map(o => o.name)
|
|
38
|
-
}
|
|
39
|
-
]);
|
|
40
|
-
let tempInfo = tempInfoList.find(o => o.name === answer.temp);
|
|
58
|
+
let answer = await inquirer.select({
|
|
59
|
+
message: 'Select temp.',
|
|
60
|
+
choices: tempInfoList.map(o => o.name)
|
|
61
|
+
});
|
|
62
|
+
let tempInfo = tempInfoList.find(o => o.name === answer);
|
|
41
63
|
if (tempInfo?.children && tempInfo.children.length > 0) {
|
|
42
|
-
answer = await inquirer.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
choices: tempInfo.children.map(o => o.name)
|
|
48
|
-
}
|
|
49
|
-
]);
|
|
50
|
-
tempInfo = tempInfo.children.find(o => o.name === answer.temp);
|
|
64
|
+
answer = await inquirer.select({
|
|
65
|
+
message: 'Select temp type.',
|
|
66
|
+
choices: tempInfo.children.map(o => o.name)
|
|
67
|
+
});
|
|
68
|
+
tempInfo = tempInfo.children.find(o => o.name === answer);
|
|
51
69
|
}
|
|
52
|
-
const creating =
|
|
70
|
+
const creating = (0, ora_1.default)(chalk.yellow('Creating...\n')).start();
|
|
53
71
|
const output = path.join(cwd, isCurrent ? '' : dirname);
|
|
54
72
|
if (!isCurrent && (0, fs_1.existsSync)(output)) {
|
|
55
73
|
return console.log(chalk.red(`${dirname} already exists!`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-packer",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.21",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": "https://github.com/kevily/create-packer",
|
|
6
6
|
"author": "1k <bug_zero@163.com>",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
".gitignore"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"
|
|
17
|
+
"@inquirer/prompts": "7.0.0",
|
|
18
|
+
"chalk": "4",
|
|
18
19
|
"commander": "8.1.0",
|
|
19
20
|
"fs-extra": "10.0.0",
|
|
20
|
-
"inquirer": "8.1.2",
|
|
21
21
|
"lodash": "4.17.21",
|
|
22
|
-
"ora": "
|
|
22
|
+
"ora": "8.1.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@biomejs/biome": "1.9.2",
|
package/template/cli/biome.json
CHANGED
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"@commitlint/cli": "17.6.1",
|
|
40
40
|
"@commitlint/config-conventional": "17.6.1",
|
|
41
41
|
"@commitlint/cz-commitlint": "17.5.0",
|
|
42
|
-
"@rsbuild/core": "1.0.
|
|
43
|
-
"@rsbuild/plugin-eslint": "1.0.
|
|
44
|
-
"@rsbuild/plugin-react": "1.0.
|
|
42
|
+
"@rsbuild/core": "1.0.10",
|
|
43
|
+
"@rsbuild/plugin-eslint": "1.0.4",
|
|
44
|
+
"@rsbuild/plugin-react": "1.0.3",
|
|
45
45
|
"@rsbuild/plugin-styled-components": "1.0.1",
|
|
46
|
-
"@rsbuild/plugin-svgr": "1.0.
|
|
46
|
+
"@rsbuild/plugin-svgr": "1.0.3",
|
|
47
47
|
"@rsbuild/plugin-type-check": "1.0.1",
|
|
48
48
|
"@rsdoctor/rspack-plugin": "0.4.2",
|
|
49
49
|
"@types/lodash-es": "4.17.7",
|
|
@@ -11,7 +11,7 @@ import { createChunks } from './scripts/createChunks'
|
|
|
11
11
|
export default defineConfig(({ envMode, command }) => {
|
|
12
12
|
const { parsed: env } = loadEnv()
|
|
13
13
|
const proxyBaseUrl = env.PUBLIC_API_HOST
|
|
14
|
-
const
|
|
14
|
+
const baseUrl = env.PUBLIC_BASE_URL
|
|
15
15
|
return {
|
|
16
16
|
html: {
|
|
17
17
|
template: './index.html'
|
|
@@ -25,11 +25,10 @@ export default defineConfig(({ envMode, command }) => {
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
dev: {
|
|
28
|
-
assetPrefix: publicPath,
|
|
29
28
|
minify: envMode !== 'dev'
|
|
30
29
|
},
|
|
31
30
|
output: {
|
|
32
|
-
assetPrefix:
|
|
31
|
+
assetPrefix: baseUrl,
|
|
33
32
|
distPath: {
|
|
34
33
|
root: 'dist'
|
|
35
34
|
},
|
|
@@ -67,15 +66,9 @@ export default defineConfig(({ envMode, command }) => {
|
|
|
67
66
|
bundleAnalyze: envMode === 'analyse' ? { openAnalyzer: true } : void 0
|
|
68
67
|
},
|
|
69
68
|
server: {
|
|
69
|
+
base: baseUrl,
|
|
70
70
|
host: '0.0.0.0',
|
|
71
71
|
compress: false,
|
|
72
|
-
historyApiFallback: {
|
|
73
|
-
disableDotRule: true,
|
|
74
|
-
index: publicPath
|
|
75
|
-
},
|
|
76
|
-
printUrls({ urls }) {
|
|
77
|
-
return urls.map(url => url + publicPath)
|
|
78
|
-
},
|
|
79
72
|
proxy: [
|
|
80
73
|
{
|
|
81
74
|
context: [proxyBaseUrl],
|