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

@chaoswise/scaffold

v1.1.14

Published

scaffold

Downloads

201

Readme

脚手架

打包工具

工具支持指令

开发环境

chaoswise-scripts dev

生产环境

chaoswise-scripts build

代码分析

chaoswise-scripts analyze

代码打包快捷指令(遵循CICD打包规范)

打包后路径为/publish/工程名-版本号-最后一次git提交日期-最后一次git提交commit记录

chaoswise-cicd

默认打包package.json字段的文件,也可以通过以下配置打包指定文件夹

outputPath=myPath chaoswise-cicd

扩展配置方式

1. 内置配置

// 修改config/webpack.config.js
module.exports = {
  themes: [
    {
      name: 'light',
      entryPath: path.resolve(__dirname, './themes/light.js')
    }, 
    {
      name: 'dark',
      entryPath: path.resolve(__dirname, './themes/dark.js')
    }
  ], // 多主题配置
  modifyVars: require.resolve('./themes/light.js'), // 单主题配置
}

|可修改的配置|描述|默认值|备注| |----|----|----|----| |debugIe|是否开启ie调试模式|false| |useMultipleTheme|是否开启多主题|false| |runtimePublicPath|是否开启动态publicPath|false|参考 |publicPath|publicPath|'/'|runtimePublicPath为false时生效| |isNoticeUpdate|是否开启升级通知|true| |speedMeasure|是否开启打包测速分析|false|speed-measure-webpack-plugin |strictPathCheck|是否开启路径严格检测模式|true|case-sensitive-paths-webpack-plugin,会延长打包时间,windows电脑无此问题可关闭| |disableESLintPlugin|是否禁用eslint|false| |checkCircularDependency|是否开启循环依赖检测|true| |nodePolyfillPlugin|Polyfill Node.js core modules in Webpack|true| |prettierFixed|是否自动格式化代码|true| |optimization|是否开启打包优化|true|需要线上部署进行debug可以关闭此配置(显示console/增加sourceMap等)| |dropConsole|build模式是否去除console|true|debug信息线上需要显示的时候| |themes|多主题配置文件配置|[]|可参考以上demo,useMultipleTheme为true时生效| |isCombinePortal|是否开启对接portal的配置|false|对接portal文档| |modifyVars|单主题配置文件|-|可参考以上demo,useMultipleTheme为false时生效 | usePolyfill|是否引入polyfill兼容ie|true|不兼容ie可以配置为false | useChaoswiseUI|是否引入@chaoswise/ui相关配置|true| | useThreadLoader|是否开启多线程编译|false|

2. 自定义webpack配置

// 修改config/webpack.config.js
name/* 配置名称 */: (original/* 默认配置 */) => {
  console.log(original);
  // demo:修改默认配置
  original.port = "8802";
  // 必须返回修改后的配置
  return original;
}
可扩展的webpack配置

|可修改的配置|描述| |----|----| |entry|入口| |output|出口| |resolve|配置如何解析模块| |babelLoader|babel解析规则| |postcssLoader|postcss-loader配置| |styleLoader|style-loader配置| |lessLoader|lessLoader配置| |threadLoader|threadLoader配置| |sassLoader|sassLoader配置| |definePlugin|配置环境变量| |miniCssExtractPlugin|miniCssExtractPlugin配置| |htmlPlugin|配置html-webpack-plugin| |htmlTagsPlugin|指定要注入的脚本或者样式文件| |copyPlugin|复制某个目录到指定目录| |analyzePlugin|代码分析| |ignorePlugin|忽略插件| |dll|dll环境全量配置| |dev|dev环境全量配置| |build|生产环境全量配置| |analyze|代码分析环境全量配置|

获取全局配置文件并修改webpack配置 merge.smart
// 修改config/webpack.config.js
expandConfig/* 配置名称 */: (original/* 默认配置 */) => {
  // 合并规则(merge.smart)
  return {
    // 自定义配置
  };
}