create-antd-skin 1.2.0 → 1.2.2

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/layout.js CHANGED
@@ -43,6 +43,7 @@ const generator_1 = __importDefault(require("@babel/generator"));
43
43
  const t = __importStar(require("@babel/types"));
44
44
  const fs_extra_1 = __importDefault(require("fs-extra"));
45
45
  const path_1 = __importDefault(require("path"));
46
+ const chalk_1 = __importDefault(require("chalk"));
46
47
  const LAYOUT_PKG = "@adminui-dev/antd-layout";
47
48
  const WARDEN_SKIN_PKG = "../components/warden-skins";
48
49
  async function patchLayoutFile(filePath) {
@@ -112,7 +113,7 @@ async function patchLayoutFile(filePath) {
112
113
  },
113
114
  });
114
115
  await fs_extra_1.default.writeFile(filePath, output.code);
115
- console.log("✔ updated:", path_1.default.relative(process.cwd(), filePath));
116
+ console.log(chalk_1.default.greenBright("✓") + " Updated:", path_1.default.relative(process.cwd(), filePath));
116
117
  }
117
118
  function hasThemeSkinsProp(node) {
118
119
  return node.attributes.some(attr => t.isJSXAttribute(attr) &&
package/bin/skin.js CHANGED
@@ -86,7 +86,7 @@ async function installSkin(skinName) {
86
86
  const cwd = process.cwd();
87
87
  const skins = await getSkinList();
88
88
  if (!skins.length) {
89
- console.error(chalk_1.default.red("❌ No skins found."));
89
+ console.error(chalk_1.default.red("× No skins found."));
90
90
  process.exit(1);
91
91
  }
92
92
  let selectedSkin = skinName;
@@ -109,7 +109,7 @@ async function installSkin(skinName) {
109
109
  }
110
110
  const skin = skins.find(item => item.name === selectedSkin);
111
111
  if (!skin) {
112
- console.error(chalk_1.default.red(`❌ Skin "${selectedSkin}" not found.`));
112
+ console.error(chalk_1.default.red(`× Skin "${selectedSkin}" not found.`));
113
113
  process.exit(1);
114
114
  }
115
115
  const spinner = (0, ora_1.default)(`Installing skin "${selectedSkin}"...`).start();
@@ -117,9 +117,8 @@ async function installSkin(skinName) {
117
117
  await copySkinFiles(selectedSkin, skin.path, cwd);
118
118
  await updateSkinIndex(selectedSkin, cwd);
119
119
  spinner.succeed(`Skin "${selectedSkin}" installed.`);
120
- console.log(chalk_1.default.gray(`
121
- ✨ Skin installed successfully!
122
- // Simply adding the skin name to the settings will take effect, e.g.
120
+ console.log(chalk_1.default.greenBright(`✨ Skin installed successfully!`));
121
+ console.log(chalk_1.default.gray(`// Simply adding the skin name to the settings will take effect, e.g.
123
122
  const layoutConfig: LayoutConfig = {
124
123
  skinName: "${toCamelCase(selectedSkin) ?? "<skin-name>"}",
125
124
  ...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-antd-skin",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "this is skin-cli for @adminui-dev/antd-layout",
5
5
  "main": "index.js",
6
6
  "author": "zhouwenqi",