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

jaraxxus

v4.2.2

Published

Create a development environment for react, and the included project build.

Downloads

221

Readme

Jaraxxus

用此工具包可以快速创建一个 React 开发环境。提高项目创建效率。

Usage

  • 创建 React 项目后,在根目录添加jaraxxus.config.js配置文件进行 webpack 的基本配置;(在 v4.0.0 版本后已经不需要 jaraxxus.config.js 文件了,会使用默认配置)
  • jaraxxus start 命令用作 dev 环境;
  • jaraxxus build 命令用作项目打包。
  • dev 环境中需要 node >= 10.X

API

jaraxxus.config.js

module.exports = {
  entry: 'src/index.js', // webpack entry
  needPolyfill: true, // 是否需要自动引入polyfill
  publicPath: '/', // output.publicPath
  assetsDir: 'static', // 资源目录
  outputDir: 'dist', // 打包目录
  srcDir: 'src', // 开发目录
  eslintConfigFile: undefined, // eslint.rules.js为根目录文件
  indexPath: 'public/index.html', // SPA入口HTML
  favicon: 'public/favicon.ico', // 站点favicon
  productionSourceMap: false, // 生成环境是否需要sourcemap js
  configureWebpack: {}, // webpack 配置,最后通过webpack-merge合并配置
  bundleAnalyzerReport: false, // webpack-bundle-analyzer 是否启用
  devServer: {
    // 和devServer配置相同,可以全量配置
    publicPath: '/',
    port: 9999,
    clientLogLevel: 'info',
    historyApiFallback: true,
    compress: true,
    hot: true,
    open: true,
    overlay: { warnings: false, errors: true },
    contentBase: undefined,
    quiet: true,
  },
  css: {
    extract: true, // production 环境下,
    cssModules: false, // 是否启用css模块化
    sourceMap: false, // css sourceMap
    lessModifyVars: {}, // less modifyVars 配置
    loaderOptions: {
      style: {}, // style-loader options
    },
  },
};

配置 babel

此版本已经不需要额外的配置babel.config.js文件了。

如果需要额外的配置,默认使用babel中的extends配置项去拓展配置。

babel.config.js 参考文件

module.exports = {
  presets: [
    [
      require.resolve('@babel/preset-env'),
      {
        modules: false,
        targets: {
          browsers: [
            'last 3 versions',
            'ie >= 9',
            'ie_mob >= 10',
            'ff >= 30',
            'chrome >= 34',
            'safari >= 6',
            'opera >= 12.1',
            'ios >= 6',
            'android >= 4.4',
            'bb >= 10',
            'and_uc 9.9',
          ],
        },
      },
    ],
    [
      require.resolve('@babel/preset-react'),
      {
        development: process.env.NODE_ENV === 'development',
        useBuiltIns: true,
      },
    ],
    require.resolve('@babel/preset-typescript'), // support ts
  ],
  plugins: [
    require.resolve('react-hot-loader/babel'),
    require.resolve('@babel/plugin-syntax-dynamic-import'),
    require.resolve('@babel/plugin-proposal-class-properties'),
    require.resolve('@babel/plugin-proposal-export-default-from'),
  ],
};

关于 postcss

此版本已经不需要格外的配置postcss.config.js文件了。

如果需要额外的配置,可以另外声明postcss.config.js,将会覆盖已有的默认配置(postcss-preset-env & postcss-normalize)。

What means Jaraxxus

Load Jaraxxus Infernal

Jaraxxus 是炉石中的一个恶魔,他非常强大,2 费可以召唤一个 666 的地狱火。

我希望此项目也能通过简单的配置创建出强大的 React 项目。