4.9.3 • Published 2 years ago

@wgoo/cli-command v4.9.3

Weekly downloads
30
License
MIT
Repository
-
Last release
2 years ago

@wgoo/cli-command

@wgoo/cli-command is the Standard Tooling for wego's FE Development.

Get Start

npm i @wgoo/cli-command -D
yarn add @wgoo/cli-command --dev

preset: wsxc

预设模块

{
  // 无默认,目前只支持配置wsxc,表示开启wsxc预设
  preset: 'wsxc',
  // 项目标识,必传,例如:portal
  // 用于确定当前工程
  project: 'xxxx',
  // 资源存放的域名,必传,影响相对路径的资源
  origin: wgoo_cdn.origin,
  cssLinks: [],// 依赖的css 会插入在header加载
  beforeJs: [],// 前置依赖的js 会插入在dody头部
  afterJs: [],// 后置依赖的js 会插入在body末尾
  // 业务支撑工程的清单,格式:name:version
  // 业务支持工程配置不用重发手脚架cli-command
  // 配置生成的链接由脚手架cli-command控制
  // 如某工程规则发生变化需要手脚架重新发包
  basics: {
    '@wgoo/federation': '1.5.0',
    '@wgoo/core': '1.1.1',
    '@wgoo/service': '1.6.1',
    wgoo: '0.2.7',
  },
  // 子工程清单,必传,格式:name:version
  // 子工程的加载链接同样由脚手架cli-command控制拼接
  // 脚手架cli-command在拼接链接时,会自动加上时间戳参数:v=${timestamp}
  projects: {
    portal: 'a101',
    album: 'a101',
    order: 'a101',
    biz: 'a101',
    xway: 'a101',
  },
  // webpack模块联邦配置,必传
  federation: {
    // name默认值options.project
    // name: ${options.project}

    // library默认{ type: 'var', name: federation.name }
    // library: { type: 'var', name: federation.name }

    // filename默认根据project和projects对应版本生成
    // filename: `wg-${options.project}@${projects[options.project]}.js`

    // remotes配置默认基于projects生成,配置了该参数,将进行与projects生成的配置合并
    // remotes: { WgPortal: 'WgPortal', WgOrder: 'WgOrder', WgBiz: 'WgBiz' }

    // exposes federation对外暴露,必传,无默认值
    exposes: {
      '.': './src/app.js',
      './routes': './src/routes/index.js'
    }

    // shared 默认['react', 'react-dom', 'react-router', 'react-intl', 'mobx', 'mobx-react', 'sortablejs'],设置了将和默认进行合并
    // shared: ['react', 'react-dom', 'react-router', 'react-intl', 'mobx', 'mobx-react', 'sortablejs'],
  }
}
4.9.3

2 years ago

4.9.0

2 years ago

4.9.2

2 years ago

4.9.1

2 years ago

4.7.2

2 years ago

4.7.1

2 years ago

4.7.3

2 years ago

4.6.7

3 years ago

4.6.6

3 years ago

4.6.9

3 years ago

4.6.8

3 years ago

4.8.1

2 years ago

4.8.0

2 years ago

4.7.0

2 years ago

4.6.1

3 years ago

4.6.3

3 years ago

4.6.2

3 years ago

4.6.5

3 years ago

4.6.4

3 years ago

4.5.8

3 years ago

4.5.7

3 years ago

4.5.9

3 years ago

4.5.6

3 years ago

4.6.0

3 years ago

4.5.5

3 years ago

4.5.4

3 years ago

4.5.3

3 years ago

4.5.2

3 years ago

4.5.1

3 years ago

4.5.0

3 years ago

4.4.1

3 years ago

4.4.0

3 years ago

4.4.2

3 years ago

4.3.9

3 years ago

4.3.6

3 years ago

4.3.5

3 years ago

4.3.8

3 years ago

4.3.7

3 years ago

4.3.4

3 years ago

4.3.3

3 years ago

4.3.2

3 years ago

4.3.1

3 years ago

4.3.0

3 years ago

4.2.2

3 years ago

4.2.1

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

2.7.0

3 years ago

2.9.0

3 years ago

2.8.0

3 years ago

3.9.0

3 years ago

3.4.0

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.8.0

3 years ago

3.7.0

3 years ago

3.6.0

3 years ago

3.5.0

3 years ago

3.0.0

3 years ago

4.0.0

3 years ago

2.5.0

3 years ago

2.6.0

3 years ago

2.4.0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.9.0

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.9.2

3 years ago

0.9.0

3 years ago

0.9.1

3 years ago

0.8.0

3 years ago