Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

itaro

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itaro

A tool for taro build multiple app

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

itaro

NPM version NPM David npm
taro 一键打包 cli 对于一个由 @tarojs/cli 创建的 taro 项目,可以零配置一键打包多种小程序代码 也可以在taro 项目的 package.json添加 itaro 属性进行个性化配置。

安装(install)

npm install -g itaro

命令(commands)

  • itaro build
$ itaro build
  • build in watch mode
$ itaro watch
  • show itaro version
$ itaro -v
  • get help
$ itaro -h

配置(config)

在 taro 项目的 package.json,添加配置项

// package.json
{
  ...
  "itaro": {
    "build": {
      "output": "itaro", // 打包默认的输出根目录
      "excludes": ["rn"], // 不需要打包的小程序名称
      "options": ["alipay", "tt", "qq", "weapp", "rn"] // 需要打包的小程序名称
    }
  }
}

options 除了可以是 weapp, alipay 等字符串也可以是

"options": [
  {
    // 构建名称
    "name": "weapp",
    // 构建命令(默认为 npm run build:构建名称)
    "command": "npm run build:weapp", 
     // 输出目录(默认为 输出根目录/构建名称)
    "output": "itaro/weapp",
  }
]

实现原理

通过修改 config/index.js outputRoot 属性来实现 itaro-build

{
  "output": "itaro",
  "options": ["weapp", "alipay", "swan", ...]
}

runTask("weapp")
// 修改 outputRoot: "itaro/weapp",
// 执行构建命令 npm run build:weapp
// 还原 outputRoot: "dist",
runTask("alipay")
// 修改 outputRoot: "itaro/alipay",
// 执行构建命令 npm run build:alipay
// 还原 outputRoot: "dist",
runTask("swan")
// 修改 outputRoot: "itaro/swan",
// 执行构建命令 npm run build:swan
// 还原 outputRoot: "dist",

// ...

CHANGELOG

CHANGELOG

LECENSE

MIT

Keywords

FAQs

Package last updated on 03 Jun 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc