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

@dream2023/itaro

v0.0.5

Published

Taro 按需编译解决方案。

Downloads

7

Readme

安装

项目安装:

yarn add @dream2023/itaro -D # npm install --save-dev @dream2023/itaro

全局安装:

yarn global add @dream2023/itaro # npm install -g @dream2023/itaro

使用

taro 1.x 和 2.x 使用方式

第 1 步:修改 package.json,增加 scripts,例如:

{
  "dev:weapp": "npm run build:weapp -- --watch",
  "dev:itaro": "itaro npm run dev:weapp"
}

上面演示的是启动 dev:weapp,如果是启动 build:h5,可以增加 itaro npm run build:h5,其实就是在 itaro 后面跟着启动命令。

第 2 步:修改 config/index.jsdefineConstants 字段为:

{
  defineConstants: {
    'process.env.ITARO': process.env.ITARO
  }
}

第 3 步:修改 app.jsx 或者 app.tsx

// ...
class App extends Component {
  // 增加一个三元表达式
  config = process.env.ITARO
    ? process.env.ITARO
    : {
        pages: ["pages/index/index"],
        // ...
      }
}

taro 3.x 使用方式

第 1 步:修改 package.json,增加 scripts,例如:

同 1.x 和 2.x。

{
  "dev:weapp": "npm run build:weapp -- --watch",
  "dev:itaro": "itaro npm run dev:weapp"
}

上面演示的是启动 dev:weapp,如果是启动 build:h5,可以增加 itaro npm run build:h5,其实就是在 itaro 后面跟着启动命令。

第 2 步:修改 app.config.js 或者 app.config.ts 为:

import itaro from "@dream2023/itaro"

export default itaro({
  pages: ["pages/index/index"],
  // ...
})

自定义编译模式

如果你使用了本工具,强烈建议配合小程序开发工具的 自定义编译模式,一步到自定义页面。

itaro

特别说明

  • subpackages 页面,如果选择了 root 页面,则会自动选择全部子页面;
  • tabBar 中的页面会被自动选中,不会出现在选择列中;
  • preloadRule 字段会被删除;
  • itaro 会缓存用户的选择,所以当第二次启动时,会提示是否沿用之前的选择;
  • 缓存是持久化文件存储的,所以一旦改变 app 的配置项(比如修改了 tabbar 或者新增了页面),再次启动时,需要重新选择来更新缓存!!!