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 🙏

© 2025 – Pkg Stats / Ryan Hefner

upload-tx-cos-webpack-plagin

v1.2.3

Published

upload-tx-cos-webpack-plagin

Downloads

3

Readme

上传腾讯云cos插件

零配置将文件(js,css,图片)等资源上传至腾讯云COS中,域名自动配置CDN,同时支持webpack插件调用或者bash命令行直接调用,蓝盾上也发布了这个插件,欢迎关注使用。

特性和使用

1: 零配置

无需用户配置,直接调用,即可将编译后的dist文件全部上传到腾讯云cos,可用于常规前端项目。

import UploadTxCos from 'UploadTxCos';

  // 命令行直接调用,无需配置,默认将dist下面的文件全部上传
UploadTxCos().push();

2: 多场景

调用方式多样化,可以在package.json的script中直接调用,也可以通过webpack插件使用,或者在蓝盾上配置流水线使用,提高CD的通用性。

//导入UploadTxCos模块
const UploadTxCos = require('UploadTxCos');
module.exports = {
  //添加插件
  plugins:[
      new UploadTxCos()
  ]
}

3: 多文件

支持批量上传,指定文件夹,自动递归,全部上传,也可以通过给定数组,自定义需要上传的文件。

//导入UploadTxCos模块
const UploadTxCos = require('UploadTxCos');

UploadTxCos().push({
  // 多文件上传
  files: [
    './public/1.jpg',
    './public/2.jpg'
  ],
  // 多文件夹上传
  folder: ['./dist', './static']
})

4: 可视化预览,上传和下载,图片缩放,功能更强大

COSBrowser已支持Windows/macOS/Linux/安卓/ios,可以更直观,多终端的操作文件。

下载地址;https://github.com/tencentyun/cosbrowser

5: 自动配置CDN加速

域名自动配置配置CDN加速,不需用户再去设置,减少配置流程保证下载速度。

6: 自定义配置

如用需要使用自己云上的分桶,通用支持接入和配置。

//导入UploadTxCos模块
const UploadTxCos = require('UploadTxCos');

const cosHandle = UploadTxCos({
 Bucket: '桶id', 
 Region: '地域id', 
 SecretId: '腾讯云cos账号id', 
 SecretKey: '腾讯云cos账号key',
 projectId: '项目英文名称'
});

cosHandle.push({
 // 多文件上传
 files: [
   './public/1.jpg',
   './public/2.jpg'
 ],
 // 多文件夹上传
 folder: './dist'
})

7: 隔离性好

可以设置不同的分桶在保证不同资源的隔离性,同时如果发现上传同路径重名的文件会直接报错,不会覆盖,保证线上业务的稳定性。