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

welabx-cli

v0.7.15

Published

welabx code pack tool

Downloads

81

Readme

welab 项目脚手架

快速搭建相同配置的项目.

安装

// npm i nrm -g // 安装 nrm
// nrm add fenpm http://fenpm.xxx.com // 添加内部源
// nrm use fenpm // 切换至内部源
npm i welabx-cli -g

使用

// 1. 初始化新项目(create a new project):
welabx create
welabx create <projectName> [options]
// @param {projectName} 必传
// @param {options} -l|--local 可选参数, 用于禁止检查版本更新
// @param {options} -i|--install 可选参数, 创建项目后自动安装依赖
welabx run build
welabx run dev
welabx inspect

// 2. 切换到项目目录
cd myplugin

// 3. 安装依赖
npm install

依赖包

  • welabx-template

welabx-cli.conf 默认配置项

{
    // 公共资源请求路径
    publicPath: '/',
    // 打包输出路径
    outputDir:  'dist',
    // 静态资源输出路径
    assetsDir:  'static',
    /*
     * 支持多页面/单页面打包
    */
    pages:      {
        index: {
            entry: './src/main.js',
            // filename: 'index.html',
            // html 模板文件
            template: './public/index.html',
            // html 标题
            title: 'title',
            // favicon: '',
        },
        hello: {
            entry: './src/hello.js',
            // filename: 'index.html',
            // html 模板文件
            template: './public/index.html',
            // html 标题
            title: 'title',
            // favicon: '',
        },
    },
    // 默认情况下 babel-loader 忽略其中的所有文件 node_modules
    transpileDependencies: [
        /node_modules/,
    ],
    // sourceMap
    sourceMap: process.env.NODE_ENV === 'production' ? false : 'cheap-module-eval-source-map',
    // webpack 配置项, 链式配置webpack, 脚手架内置了部分配置项, 这里可以进行覆盖, 优先级最高!
    webpackChain(config) {
        // 在这里可以自定义 webpack 配置项
        /* config.optimization
            .splitChunks({
                cacheGroups: {},
            }); */
    },
    // 本地开发 devServer 配置
    devServer: {
        hot:                true,
        open:               true,
        quiet:              true,
        progress:           false,
        compress:           false,
        historyApiFallback: true,
        overlay:            {
            warning: true,
            errors:  true,
        },
        // proxy 支持字符串和对象方式
        // proxy: {}
    },
    // terser-webpack-plugin 配置项
    terserOptions: {},
    // 是否启用多线程进行生产编译, 默认为true
    parallel: true,
}

TODO

  • run 命令
  • npm / yarn
  • 动态配置 module.rules
  • inspect 审查当前配置项