天天看點

開源推薦:阿裡的一款低代碼平台/新開源

作者:一隻程式猿粑粑
阿裡最新開源的一款低代碼開發平台

傳送門

https://github.com/alibaba/lowcode-engine

✨ 特性

  • 提煉自企業級低代碼平台的面向擴充設計的核心引擎,奉行最小核心,最強生态的設計理念
  • 開箱即用的高品質生态元素,包括 物料體系、設定器、插件 等
  • ⚙️ 完善的工具鍊,支援 物料體系、設定器、插件 等生态元素的全鍊路研發周期
  • 強大的擴充能力,已支撐近 100 個各種垂直類低代碼平台
  • 使用 TypeScript 開發,提供完整的類型定義檔案

相容環境

  • 現代浏覽器(Chrome >= 80, Edge >= 80, last 2 safari versions, last 2 firefox versions)

引擎協定

引擎完整實作了《阿裡巴巴中背景前端基礎搭建協定規範》和《阿裡巴巴中背景前端物料協定規範》,協定棧是低代碼領域的物料能否流通的關鍵部分。

開源推薦:阿裡的一款低代碼平台/新開源

使用示例

npm install @alilc/lowcode-engine --save-dev           
TIPS:僅支援 cdn 方式引入,npm 包用于提供 typings 等代碼提示能力
import { init, skeleton } from '@alilc/lowcode-engine';

skeleton.add({
  area: 'topArea',
  type: 'Widget',
  name: 'logo',
  content: YourFantaticLogo,
  contentProps: {
    logo:
      'https://img.alicdn.com/tfs/TB1_SocGkT2gK0jSZFkXXcIQFXa-66-66.png',
    href: '/',
  },
  props: {
    align: 'left',
    width: 100,
  },
});

init(document.getElementById('lce'));           

工程化配置:

{
  "externals": {
    "@alilc/lowcode-engine": "var window.AliLowCodeEngine",
    "@alilc/lowcode-engine-ext": "var window.AliLowCodeEngineExt"
  }
}           

cdn 可選方式:

方式 1:alifd cdn

https://alifd.alicdn.com/npm/@alilc/[email protected]/dist/js/engine-core.js

https://alifd.alicdn.com/npm/@alilc/[email protected]/dist/js/react-simulator-renderer.js           

方式 2:unpkg

https://unpkg.com/@alilc/[email protected]/dist/js/engine-core.js

https://unpkg.com/@alilc/[email protected]/dist/js/react-simulator-renderer.js           

方式 3:jsdelivr

https://cdn.jsdelivr.net/npm/@alilc/[email protected]/dist/js/engine-core.js

https://cdn.jsdelivr.net/npm/@alilc/[email protected]/dist/js/react-simulator-renderer.js           

方式 4:使用自有 cdn

将源碼中 packages/engine/dist 和 packages/(react|rax)-simulator-renderer/dist 下的檔案傳至你的 cdn 提供商

相關連結

  • 官網首頁
  • Demo 馬上玩 | 引擎 Demo 倉庫
  • 官方物料
  • 官方設定器(setter)
  • 官方插件(plugin)
  • 生态元素(物料、setter、插件)工具鍊
  • 使用者文檔
  • API [WIP]

本地調試

$ git clone [email protected]:alibaba/lowcode-engine.git
$ cd lowcode-engine
$ npm install
$ npm run setup
$ npm start           

npm 通路速度較慢,阿裡員工可以使用 tnpm,其他同學建議使用 cnpm 或者指定鏡像 registry。

node 版本限定在 14

windows 環境必須使用 WSL,其他終端不保證能正常運作

繼續閱讀