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

aqa-report-sdk

v0.1.17

Published

快应用打点sdk

Downloads

60

Readme

小爱快应用打点sdk:

使用方法:

  • 安装依赖:
        npm install --save aqa-report-sdk
  • 引用reportConnect
        import { reportConnect } from 'aqa-report-sdk'
    
        const appComponent =
            showMenu: util.showMenu,
            createShortcut: util.createShortcut
        }
        export default reportConnect.call(this, {appComponent, {
            type: 'app'
        })
    reportConnect的参数是:
    • 1.app或页面script脚本实例
    • 默认配置:{
      • isImmediately 是否实时上传,默认为true,当传入为false时,在组件销毁时上传所有打点
      • type实例类型,可以传入app或者page,默认是page,只有在 type===app会上传apponCreate生命周期的耗时,type===page会上传页面onInit onReady, onShow生命周期的耗时。 debug 是否打印日志,默认为true }
  • 引用customReport 自定义打点
    customReport({
        reportKey: 'pageOnProgress1',
        timestamp: new Date().getTime(),
        isImmediately: false
    })
    参数:
    • reportKey为必传参数,可以为pageOnProgress1pageOnProgress2pageOnProgress3,即用户自定义时间节点
    • timestamp为必传参数,即当前时间戳

注意:

  • 当在真实的环境上传数据时,请设置环境变量和常量``NODE_ENVproduction。步骤为
    • 在根目录创建config文件夹
    • config目录下面创建
    • webpack.config.js中写入如下代码
        const webpack = require('webpack')
    
        function postHook (webpackConf, defaults, options) {
            webpackConf.plugins.push(
                // 定义环境变量
                new webpack.DefinePlugin({
                    // 增加环境变量
                    NODE_ENV:  JSON.stringify(process.env.NODE_ENV),
                })
            )
        }
    
        module.exports = {
            postHook
        }
    • 安装cross-env
    • 在package.json写入
        "release": "cross-env NODE_ENV=production hap release",
        "watch": "cross-env NODE_ENV=preview hap watch"