Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
captain-ui
Advanced tools
npm i -S captain-ui
// .babelrc or babel-loader option
{
"plugins": [
["import", { "libraryName": "captain-ui", "style": true }]
]
}
接着你可以直接引入 captain-ui 组件,等价于下方的按需引入组件
// 模块化地引入 js 和 css, 通过 babel-plugin-import 插件解析
import { Pay } from 'captain-ui';
每个组件都有自己对应的npm包,可以直接单独引入对应的包
import { Pay } from 'captain-pay';
css 文件引入需要 postcss-easy-import 类似插件解析引入的css文件路径
@import 'captain-pay';
// 没有插件的情况下,可以用以下方式直接引入
// @import 'captain-pay/lib/index.css';
yarn install
localhost 127.0.0.1
make dev
在浏览器中打开 http://localhost:3003/ 即可
以创建组件 OrderPay 为例
使用make init 创建组件
make init order-pay
在 docs/doc.config.js
中增加对应的文档配置
在 docs/examples-docs
目录下增加对应组件的文档,默认会直接引入 index.md
文档进行编译
与index.md同级目录下的 config.js
定义mock的请求数据,格式如下:
module.exports = [{
// 发起请求的链接
url: '/v2/pay/UnifiedCashier/getQrcode.json',
// 发起请求的请求方式
method: 'POST',
// 请求的返回数据内容
response: {
code: 0,
msg: '处理成功',
data: {
content: 'aHR0cHM6Ly93d3cuaGFvMTIzLmNvbS8=',
imageFormat: 'png',
codeFormat: 'QR_CODE',
encoding: 'BASE64',
width: 300,
height: 300
}
}
}, {
url: '/v2/pay/UnifiedCashier/payStatus.json',
method: 'POST',
response: {
code: 0,
msg: '处理成功',
data: {
status: 'success'
}
}
}];
FAQs
有赞vue wap业务组件库
The npm package captain-ui receives a total of 6 weekly downloads. As such, captain-ui popularity was classified as not popular.
We found that captain-ui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.