New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@we-weaver/cli

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@we-weaver/cli

Cli tool for build we weaver

latest
npmnpm
Version
1.1.0-beta.5
Version published
Maintainers
4
Created
Source

Weaver cli

Quick start

安装包

  yarn global add @we-weaver/cli

or

  npm install @we-weaver/cli -g

初始化配置

安装成功后使用改命令初始化配置

  weaver config --init

登录

输入 OA 帐号密码即可

  weaver login

Usage

初始化组件或场景

tip:初始化时输入组件的名称即可,组件的类型会在创建成功后修改 例如 weaver init sidebar,选择业务组件,将会生成 basic-component-sidebar 目录,如果目录名称有误(没有正确的包含组件的类型),请手动调整名称。

  • 基础组件
  • 业务组件
  • 场景

  weaver init [组件或场景名称]

上传组件至组件平台

组件上传的标准是当前目录下存在 package.json 文件.


  weaver upload [目标目录或者当前目录]

打包

内置 (Bili)[https://bili.egoist.sh/#/] 打包工具

  weaver build <entry> [type=jsx|vue]

调试

内置 (Poi)[https://poi.js.org/] 调试工具

  weaver dev [entry] --serve

其它

如果需要调整调试或者打包配置, 在 package.json 中新增 weaver 字段或者新增 weaver.config.js 文件


  {
    ...
    "weaver": {
      // 上传配置
      "upload": {
        // 需要上传的目标仓库
        "repository_id": 5247,
        // 目标分支
        "target_branch": "master",
        // 上传需要忽略的文件或文件夹,会与 .gitignore 中的内容进行合并
        "excludes": [
          ".vscode",
          "node_modules",
          ".git",
          ".gitignore",
          ".DS_Store",
          "dist",
          "screenshots",
          "yarn.lock",
          "package.lock",
        ],
      },
      "buildConfig": {
        // https://poi.js.org/config.html
      },
      "devConfig": {
        // https://bili.egoist.sh/#/
      }
    }
  }

FAQs

Package last updated on 08 Jul 2020

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