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

@pitrix/iot

v1.13.2-beat1

Published

IoT

Downloads

3

Readme

QingCloud Boss 2.0 IoT Sub Module

开发环境搭建

按照 QingCloud Boss 2.0第三方系统接入 BOSS2 标准来搭建,有几个地方需要注意或改动:

set npm registry

除了要配置 QingCloud Boss 2.0 中的 registry 外,还要配置:

npm config set @BOSS:registry http://172.16.0.60:7001

BOSS 中的 IoT 分支

subprojects/iot

安装依赖 titan-plugins

执行 npm i 之前,需执行

npm --registry=http://r.npm.internal.yunify.com/ install titan-plugins

安装本项目 npm packages

cd ./src/sub-projects/iot/
npm install

添加 Visual Studio Code 工作区设置(可选,不使用 Visual Studio Code 可忽略此节)

由于 pitrix-boss-console-2.0 项目下的 .eslintignore 有如下规则:

src/sub-projects/

因为在开发本项目时,是无法使用 ESLint 的。

又因为 pitrix-boss-console-2.0 项目下的 .gitignore 有如下规则:

.vscode/settings.json

因此我们可以向 Visual Studio Code 工作区设置 ESLint 的工作目录来使用 ESLint(需安装 ESLint);以及添加路径提示(需安装 Path Intellisense)。

{
  "eslint.workingDirectories": ["./src/sub-projects/iot"],
  "path-intellisense.absolutePathToWorkspace": true,
  "path-intellisense.mappings": {
    "/": "${workspaceRoot}",
    "assets": "${workspaceRoot}/src/assets",
    "scss": "${workspaceRoot}/src/scss",
    "components": "${workspaceRoot}/src/components",
    "modules": "${workspaceRoot}/src/modules",
    "widgets": "${workspaceRoot}/src/widgets",
    "routers": "${workspaceRoot}/src/routers",
    "stores": "${workspaceRoot}/src/stores",
    "locales": "${workspaceRoot}/src/locales",
    "constants": "${workspaceRoot}/src/constants",
    "BICommons": "${workspaceRoot}/src/modules/OperationManagement/Commons",
    "subprojects": "${workspaceRoot}/src/sub-projects",
    "iot": "${workspaceRoot}/src/sub-projects/iot/src"
  }
}

版本发布流程

标准版本:

npm run release
qnpm publish

构建发布到仓库中所需的文件,standard-version 会生成 changelog,打上 tag 并提交 commit;

你也可以指定版本

qnpm run release -- --release-as 1.1.0

预发布版本:

预发布版本不希望生成 changelog, 所以可以在 package.json 中 手动调整版本号,例如 1.1.3-xx,发布时需要指定 tag 为 next。

qnpm publish --tag=next

更新到 staging 环境

合并代码

subprojects/iot 分支合并到 testing 分支

修改 webpack.*.conf.js

testing 分支中 ./webpack/webpack.dev.conf.js./webpack/webpack.prop.conf.jsresolve.alias.iot 删掉

./webpack/webpack.base.conf.js 中的 resolve.alias.iot 做如下修改

{
  "resolve": {
    "alias": {
      "iot": "@pitrix/iot/lib"
    }
  }
}

安装依赖

安装 titan-plugins

npm --registry=http://r.npm.internal.yunify.com/ install titan-plugins

安装其他 npm packages

npm install

打包

在本地跑一下 testing 分支,看有没有什么问题,没什么问题就可以打包了

npm run build

更新到 staging 环境

sh bin/rsync.sh staging

P.S.

需先添加本机的 SSH 公钥 到 BOSS2 的 staging 服务器


注意事项

local_config.yaml

server:
  backend_uri: http://boss2.staging.com
  port: 8888
  log_path: /pitrix/log/boss-console

client:
  global:
    api_host: http://boss2.staging.com
  iot:
    default_zone: staging

P.S.

{
  "default_zone": {
    "staging": "staging",
    "production": "pek3"
  }
}

开发 URL

http://127.0.0.1:8888/

增加或修改导航

开发新页面时,需要在「BOSS2 后端管理系统」中的「Permissions」-「导航」里增加或修改。

地址

testing

staging

账号

{
  "username": "[email protected]",
  "password": "zhu88jie"
}

详情请参见 第三方项目开发注意事项


项目开发规范

参见 pitrix-iot-console中的 项目开发规范


参考与引用