Socket
Book a DemoInstallSign in
Socket

@uni-helper/uni

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uni-helper/uni

@uni-helper提供的cli封装工具

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
135
-63.22%
Maintainers
3
Weekly downloads
 
Created
Source

banner


[WIP]由 uni-helper 封装的uni命令

安装

pnpm i -D @uni-helper/uni

使用

📖 请阅读完整文档了解完整使用方法!

pnpm dev wx
// package.json
{
  "scripts": {
    "dev": "unh dev",
    "build": "unh build",
    "prepare": "unh prepare"
  }
}
// uni.config.ts
import { defineConfig } from '@uni-helper/uni'

export default defineConfig({
  platform: {
    // 默认平台
    default: 'h5',
    // 平台别名
    alias: {
      'h5': ['w', 'h'],
      'mp-weixin': ['wx'],
    },
  },
  prepare: {
    install() {
      console.log('install')
    },
    build(platform: string) {
      console.log('build:', platform)
    },
    dev(platform: string) {
      console.log('dev:', platform)
    },
  },
  autoGenerate: {
    pages: true,
  },
})

Keywords

uni

FAQs

Package last updated on 02 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts