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

ahua-taro

v0.0.49

Published

Yara means a good harvest, but to achieve it, you need water. Aƕa is like water; it assembles the drops of its core components into powerful streams of customer experiences. It flows through the product UI, bringing it to life.

Downloads

123

Readme

ahua-taro

NPM version NPM downloads

Yara 意味着丰收,但要实现丰收,需要水。Aƕa 就像水一样,它将其核心组件的点滴汇聚成强大的客户体验流。它流淌在产品的界面上,使其生动起来。

使用

CSS-in-js

ahua-taro 是基于 linaria 的样式方案,所以需要进行相关配置:

安装依赖

yarn add @linaria/babel-preset @linaria/webpack-loader

修改配置

// config/index.js
const config = {
...
      webpackChain: (chain, webpack) => {
+      // linaria/loader 选项详见 https://github.com/callstack/linaria/blob/master/docs/BUNDLERS_INTEGRATION.md#webpack
+      chain.module
+        .rule('script')
+        .use('linariaLoader')
+        .loader('@linaria/webpack-loader')
+        .options({
+          sourceMap: process.env.NODE_ENV !== 'production',
+        });
+      chain.module // fixes https://github.com/graphql/graphql-js/issues/1272
+        .rule('mjs$')
+        .test(/\.mjs$/)
+        .include.add(/node_modules/)
+        .end()
+        .type('javascript/auto');
+      chain.merge({
+        module: {
+          rule: {
+            pageLoader: {
+              test: /pages\/.+index\.tsx$/,
+              use: [
+                {
+                  loader: path.resolve(
+                    __dirname,
+                    '../node_modules/ahua-taro/dist/page-loader',
+                  ),
+                  options: {},
+                },
+              ],
+            },
+            polyfillLoader: {
+              test: /tsx?$/,
+              use: [
+                {
+                  loader: path.resolve(
+                    __dirname,
+                    '../node_modules/ahua-taro/dist/polyfill-loader.js',
+                  ),
+                  options: {},
+                },
+              ],
+            },
+          },
+        },
+      });
...
}

根目录添加 linaria.config.js 文件

// linaria.config.js
// linaria 配置详见 https://github.com/callstack/linaria/blob/master/docs/CONFIGURATION.md#options
module.exports = {
  rules: [
    {
      action: require("@linaria/shaker").default,
    },
    {
      test: /node_modules[/\\](?!@tarojs)/,
      action: "ignore",
    },
    {
      test: /(?!.*\/ahua-taro\/dist\/page-loader\.js).*ahua-taro\/dist\/.*\.js$/,
      action: "ignore",
    },
    {
      test: /icon-set/,
      action: "ignore",
    },
  ],
};

开发

# 安装依赖
yarn install

# 编译
yarn build

# 热编译
yarn build:watch

# 本地发布
yalc publish

# 其他项目安装本地发布的包
yalc add ahua-taro

# 修改版本号
yarn version

# 发布到npm
npm publish