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

@qse/common-utils

v1.3.47

Published

react工程的工具类

Downloads

5

Readme

CommonUtils

react工程的工具类

安装使用

通过 npm 安装

common-utils 可以通过 npm 安装到项目中, 先变更注册为私库(npm config set registry http://192.168.10.162:8081/nexus/content/groups/npm-all/)

npm install common-utils --save

通过 CDN 引用

common-utils 可以通过 CDN 引入到项目中。

  • 引入指定版本。用版本号替换 [version] 部分的内容即可: https://xxx/utils[version].min.js

config 工具使用

路由分工程使用

api分工程使用

私库操作

1. npm变更为私库

npm config set registry http://192.168.10.162:8081/nexus/content/groups/npm-all/ 淘宝的: npm config set registry https://registry.npm.taobao.org/

2. npm发布私库

(1) 配置.npmrc文件 [email protected] always-auth=true _auth=YWRtaW46YWRtaW4xMjM=

_auth 的值 在任意目录下创建一个in.txt文件,里面直接写nexus访问的用户名:密码。 如:admin:admin123 不要有空行或空格等其他信息。 在in.txt目录下命令行执行 certutil /encode in.txt out.txt 执行后会在当前目录生成out.txt文件,内容是 —–BEGIN CERTIFICATE—– YWRtaW46YWRtaW4xMjM= —–END CERTIFICATE—– 第二行即为编码证书,把这串证书信息及你的邮箱信息添加到 .npmrc中:

作者:王淑君_8f58 链接:https://www.jianshu.com/p/7930b3e07ef5 来源:简书 简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

(2) 发布 npm publish --registry http://192.168.10.162:8081/nexus/content/repositories/npm-private/

nowa参数

[ '-s, --src <dir>', 'source directory, default to `src`', 'src' ],
[ '-d, --dist <dir>', 'build directory, default to `dist`', 'dist' ],
[ '-e  --entry <file>', 'app entry, default to `app/app.js`', 'app/app.js' ],
[ '    --pages [pages]', 'add multi-page entries' ],
[ '    --buildvars <json>', 'build varibles' ],
[ '    --vars <json>', 'runtime varibles' ],
[ '    --externals', 'webpack external varibles' ],
[ '-o, --loose', 'use babel es2015 loose mode to transform codes' ],
[ '-c, --keepconsole', 'keep `console.log`' ],
[ '    --keepcss', 'keep non-extracted css in all builds'],
[ '    --skipminify', 'skip minify js and css' ],
[ '-p, --progress', 'show progress' ],
[ '    --exportcss', 'export css files' ],
[ '    --multiCompilers', 'generate multi-compilers' ],
[ '    --minifyExtension <extension>', 'minify file extension' ],
[ '    --includes', 'loader should include paths' ],
[ '    --polyfill', 'use core-js to do polyfills' ],
[ '    --mangle', 'mangle varibles when minify' ],
[ '    --alias', 'path alias' ],
[ '    --publicPath <path>', 'set publicPath in webpack'],
[ '    --analyse [port]', 'analyse bundle size'],