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

@nutui/carefree

v1.0.0

Published

A H5 debugging tool independent of wifi hotspots

Downloads

10

Readme

本webpack插件功能:

  1. 处理静态资源路径,并以watch mode编译
  2. 将编译后的文件自动上传到指定服务器指定目录
  3. 在终端打印出页面入口地址并生成二维码,供手机扫描访问
  4. 监听模式下,一旦保存修改,将自动增量编译
  5. 有变化的文件会被自动增量上传到服务器
  6. 手机刷新页面或再次扫码即可

安装

npm install @nutui/carefree --save-dev

使用

  1. webpack配置文件中引入
const Carefree = require('@nutui/carefree');

plugins: [
    new Carefree({
        //配置项
    })
]
  1. package.jsonscripts字段中添加carefree-devcarefree-build命令
// package.json
scripts: {
    ...
    "carefree-dev": "cross-env NODE_ENV=carefree carefree_env=dev webpack -w --colors --progress",
    "carefree-build": "cross-env carefree_env=build npm run upload",
    ...
}
  1. 如果想在启用脚本时暂时不使用carefree,可在脚本里修改carefree_envcross-env carefree_env=stop
  2. 命令行将会打印出二维码,推荐命令行终端的主题为暗黑系
  3. 目前支持sshftp两种上传方式
  4. upload设置为false将只打印二维码,不上传静态资源
  5. 默认关闭devtool以减小上传文件的体积,需要时可以设置为webpackdevtool相应值

Carefree参数说明

| 参数 | 说明 | 默认值 | 是否必填 |----- | ----- | ----- | ----- | upload | 是否上传 | true | 否 | devtool | 参考webpack的devtool配置 | false | 否 | publicPath | 同webpackConfig.output.publicPath | - | 是 | qrcodeUrl | 扫二维码后跳转的地址 | publicPath + 'index.html' | 否 | ftp.host | 服务器ip | -- | 是 | ftp.port | 服务器 | -- | 是 | ftp.source | 待上传的目录 | -- | 是 | ftp.target | 服务器端的项目目录 | -- | 是 | ftp.username | 服务器用户名 | -- | 是 | ftp.password | 服务器密码 | -- | 是 | ssh[option] | 同ftp相关配置项 | -- | 是