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

@cloudbase/framework-core

v1.9.7

Published

CloudBase Framework 云开发 CloudBase 全栈应用开发框架,开箱即用,方便开发和部署多端+全栈的 serverless 应用

Downloads

21,621

Readme

Table of Contents

快速开始

  1. 安装 CLI
npm install -g @cloudbase/cli@latest
  1. 初始化一个应用
cloudbase new
  1. 部署应用
cloudbase framework deploy

项目示例

下面的快速开始部分可以帮助您更快地体验 CloudBase Framework 的能力,以便尽快开始将自己的项目部署起来。

每一个例子都提供了一个 部署按钮,可以点击之后在云端一键部署,将应用安装在您的腾讯云开发环境中。同时我们也提供了对应的源代码,可以查看源代码,Clone 或者下载项目到本地进行修改,在本地通过 CloudBase CLI 进行一键部署。

点击进入应用中心查看更多应用

插件

云开发 CloudBase Framework 支持插件机制,提供了多种应用框架和云资源的插件,只需要很少的配置甚至 0 配置就可以现有应用和云开发 CloudBase Framework 框架进行集成。

插件可以处理应用中的一些独立单元的构建、部署、开发、调试等流程。例如 website 插件可以处理静态网站等单元,node 插件可以处理 koa 、express 等 node 应用。插件可以组合使用。

插件的配置写在 cloudbaserc 文件中,目前仅支持 JSON 文件,后续会支持 YAML。

请参考完整的插件文档

插件的配置可以手动填写,也可以自动生成,目前针对前端框架支持自动识别填写插件。

自动检测生成插件配置流程

可以在项目目录下直接运行 cloudbase 命令进行自动检测生成插件配置文件并部署

cloudbase


✔ 是否使用云开发部署当前项目 <Projects/test/test-vue> ? (Y/n) · true
✔ 选择关联环境 · webpage - [webpage:按量计费]
   ______ __                   __ ____
  / ____// /____   __  __ ____/ // __ ) ____ _ _____ ___
 / /    / // __ \ / / / // __  // __  |/ __ `// ___// _ \
/ /___ / // /_/ // /_/ // /_/ // /_/ // /_/ /(__  )/  __/
\_________\____/ \__,_/ \__,_//_____/ \__,_//____/ \___/       __
   / ____/_____ ____ _ ____ ___   ___  _      __ ____   _____ / /__
  / /_   / ___// __ `// __ `__ \ / _ \| | /| / // __ \ / ___// //_/
 / __/  / /   / /_/ // / / / / //  __/| |/ |/ // /_/ // /   / ,<
/_/    /_/    \__,_//_/ /_/ /_/ \___/ |__/|__/ \____//_/   /_/|_|


 CloudBase Framework  info     Version v1.2.10
 CloudBase Framework  info     Github: https://github.com/Tencent/cloudbase-framework

 CloudBase Framework  info     EnvId webpage
? 检测到当前项目包含 Vue.js 项目

  🔨 构建脚本 `npm run build`
  📦 本地静态文件目录 `dist`

  是否需要修改默认配置 No
? 请输入应用唯一标识(支持大小写字母数字及连字符, 同一账号下不能相同) test-vue
? 是否需要保存当前项目配置,保存配置之后下次不会再次询问 Yes
 CloudBase Framework  info     📦 install plugins

目前支持的插件列表

| 插件链接 | 插件 | 最新版本 | 插件介绍 | | -------- | ---- | -------- | -------- | | | @cloudbase/framework-plugin-website |Npm version | 一键部署网站应用| | | @cloudbase/framework-plugin-node |Npm version | 一键部署 Node 应用(支持底层部署为函数或者 云托管)| | | @cloudbase/framework-plugin-nuxt |Npm version | 一键部署 Nuxt SSR 应用| | | @cloudbase/framework-plugin-function |Npm version | 一键部署函数资源| | | @cloudbase/framework-plugin-container |Npm version | 一键部署云托管容器服务| | | @cloudbase/framework-plugin-dart |Npm version | 一键部署 Dart 应用| | | @cloudbase/framework-plugin-database |Npm version | 一键声明式部署云开发 NoSQL 云数据库| | | @cloudbase/framework-plugin-deno |Npm version | 一键部署 Deno 应用| | | @cloudbase/framework-plugin-next |Npm version | 一键部署 Next SSR 应用| | | @cloudbase/framework-plugin-mp |Npm version | 一键部署微信小程序应用| | | @cloudbase/framework-plugin-auth |Npm version | 一键设置登录配置|

配置示例

例如一个 Vue 的全栈项目,包含网站前端和云函数

可以在在项目下手动创建一个 cloudbaserc.json,填写如下配置文件,调用 cloudbase framework deploy 进行部署

或者直接运行 cloudbase 来进行自动检测并部署

{
  "envId": "{{env}}",
  "framework": {
    "plugins": {
      "client": {
        "use": "@cloudbase/framework-plugin-website",
        "inputs": {
          "buildCommand": "npm run build",
          "outputPath": "dist"
        }
      },
      "server": {
        "use": "@cloudbase/framework-plugin-function",
        "inputs": {
          "functionRootPath": "cloudfunctions",
          "functions": [
            {
              "name": "helloworld",
              "config": {
                "timeout": 5,
                "envVariables": {},
                "runtime": "Nodejs10.15",
                "memorySize": 128
              }
            }
          ]
        }
      }
    }
  }
}

更多配置详细参数说明,可以查看配置说明文档,点击查看配置文档

Changelog

CloudBase Framework 的版本变更日志请参阅 changelog 文件

License

开源协议文档请参阅 Apache License 2.0

优秀应用案例

持续征集优秀应用案例

在线交流群

如果在使用、安装过程中有任何问题,或者建议,欢迎加群讨论、反馈问题,或加云开发小助手微信: Tcloudedu1,发送 CBF 入群。

CloudBase Framework 资讯

技术文章

✍️ 欢迎提交技术文章

演讲

新闻

Contributors ✨

Thanks goes to these wonderful people (emoji key):

All Contributors

This project follows the all-contributors specification. Contributions of any kind welcome!

贡献指南

欢迎大家参与到 CloudBase Framework 的开发工作,贡献一份力量

您可以选择如下的贡献方式:

我们会将您加入 我们的贡献者名单

贡献方式请参考 贡献指南 文档