npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@wgoo/cli-command

v4.9.3

Published

local command for wgoo projects

Downloads

9

Readme

@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'],
  }
}