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

wease-cli

v1.0.3

Published

保险师前端基础脚手架工具, 提供开箱即用的项目配置

Downloads

3

Readme

wease-cli

保险师前端基础脚手架工具, 提供开箱即用的项目配置

安装

npm install -g wease-cli

本地开发

wease dev

打包

wease build

创建项目脚手架

wease create

查看支持的项目脚手架

wease list

配置文件

wease-cli在完成基本项目所需的配置后,还向使用者暴露了一部分可能的配置。你可以在项目目录(process.cwd())下创建wease.config.js文件,并修改或增加你想要的配置。

配置说明

|属性|说明|类型|默认值|版本| |:--|:--|:--|:--|:--| |entry|打包入口,配置方式与webpack entry保持一致|String,ObjectArray|src/index.js|1.0.0| |output|打包出口,,配置方式与webpack entry保持一致|Object|-|1.0.0| |plugins|webpack plugin配置|Array|[]|1.0.0| |rules|webpack loader配置|Array|[]|1.0.0| |babelOptions|针对babel的配置|Object|{}|1.0.0| |postcssOptions|针对postcss的配置,也可以在工程目录下新建postcss.config.js|Object|{}|1.0.1| |isExtractCss|是否需要抽取单独的css|Boolean|false|1.0.0| |minCssExtract|抽取的css的目录配置信息|Object|{}|1.0.0| |devtool|sourcemap类型|参见webpack的devtool定义|sourcemap|1.0.0| |externals|需要排除的打包模块|Object|{}|1.0.0| |analyzerBundle|是否需要启动打包分析|Boolean|false|1.0.0| |htmlWebpackPluginOptions|HtmlWebpackPlugin配置(与HtmlWebpackPlugin配置相同,若传入false,则不开启)|Object|{ template: path.resolve(process.cwd(), './src/index.html') }|1.0.0| |cssModule|是否开启cssModule|Boolean|false|1.0.0| |alias|本地路径别名|Object|{}|1.0.0| |defineConstant|编译时全局变量常量|Object|{}|1.0.0| |port|本地启动端口号|StringNumber|8080|1.0.0| |host|本地启动host|String|localhost|1.0.0| |open|自动打开浏览器|Booleab|false|1.0.0| |proxy|接口代理配置|Object|{}|1.0.0| |whiteList|不需要经过proxy服务代理的域名|Array|[]|1.0.0| |staticPath|指定需要静态代理的本地目录|String|path.resolve(process.cwd(), './public')|1.0.0| |cleanDist|是否清理打包目录|Boolean|true|1.0.0|

默认配置

const path = require('path')
module.exports = {
  // webpack打包配置相关
  entry: path.resolve(process.cwd(), './src/index.js'), // webpack 入口
  output: {
    path: path.resolve(process.cwd(), './dist'),
    publicPath: './',
    // filename: 'app.js'
  }, // webpack 出口
  plugins: [], // webpack plugin配置
  rules: [], // webpack loader配置
  babelOptions: {}, // 针对babel的配置
  postcssOptions: {}, // 针对postcss的配置
  isExtractCss: false, // 是否需要抽取单独的css
  minCssExtract: {}, // 抽取的css的目录配置信息
  devtool: 'sourcemap', // sourcemap类型
  externals: {}, // 需要排除的打包模块
  analyzerBundle: false, // 是否需要启动打包分析
  htmlWebpackPluginOptions: {
    template: path.resolve(process.cwd(), './src/index.html'),
  }, // HtmlWebpackPlugin配置(与HtmlWebpackPlugin配置相同,若传入false,则不开启)
  cssModule: false, // 是否开启cssModule
  alias: {}, // 本地路径别名
  defineConstant: {}, // 编译时全局变量常量

  // devServer相关
  port: 8080, // 本地启动端口号
  host: 'localhost', // 本地启动host
  open: true, // 自动打开浏览器
  proxy: {}, // 代理配置
  whiteList: [], // history模式下不需要经过node服务代理的域名
  staticPath: path.resolve(process.cwd(), './public'), // 指定需要静态代理的本地目录
  cleanDist: true, // 是否清理打包目录
}