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

power-ops-websdk

v0.1.4

Published

The Web SDK of Power Ops Platform

Downloads

6

Readme


WEB SDK (Beta 阶段)

官网:jk.i3060.com

I3060 致力于成为新能源数字化平台中的基础设施,一个保持最大开放性和兼容性的 SaaS 平台,Web SDK 就是实现这一目的的重要对外口,我们欢迎第三方新能源数字化信息服务提供商,接入到我们的平台中,一起助力电力行业数字化建设和「3060 双碳计划」

SDK 功能介绍

  • 可让您的前端应用快速接入 I3060 平台
  • 使用 TypeScript 编写
  • 基于 SSR Web Component 不限前端框架
  • Web SDK 遵循 MIT 协议源代码开放
  • 移动端受到内置优化

快速上手

NPM 引入

npm install power-ops-websdk

CDN 引入

<script type="module">
import { Core } from 'https://cdn.jsdelivr.net/npm/power-ops-websdk/lib/core/index.js'
</script>

用法

import { Core } from 'power-ops-websdk/lib/core/index'
// 下面这种引入方式打包体积会变大
// import { Core } from 'power-ops-websdk'

const core = new Core({ window, document })

console.log(core.getToken()) // 如果没登录,会被弹出到登录界面
console.log(core.getCurrentUser())

CLI Reference

打包为压缩包

npx websdk-cli build --manifest manifest.json --input ./dist --pack dist.zip

部署压缩包

# KEY 和 UUID 可在 https://jk.i3060.com/developer 获取
export KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
npx websdk-cli deploy --key $KEY --uuid $UUID --pack dist.zip --endpoint https://jk.i3060.com

查看 CLI 帮助

npx websdk-cli -h
npx websdk-cli build -h
npx websdk-cli deploy -h

API Reference

Core Kit: 核心类