idyll 开源生成交互式web的标记语言试用

说明

Idyll is an open-source markup language and toolkit for producing interactive web pages
You give Idyll a markup file , and it compiles that file to a full bundle of HTML , Java Script , and CSS that can run in anyone' s web browser
Idyll can be used to create explorable explanations , and to add interactivity to blog engines and content management systems . The tool can generate standalone webpages or be embedded inside of an existing page , and can be fully themed to match your stylegui

大体意思:
IDYLL是一种用于生成交互式网页的开源标记语言和工具箱。
给I定dyll一个标记文件,可以将该文件编译成可以在任何人的Web浏览器中运行的HTML、Java脚本和CSS的完整包。
IDYLL可以用来创建可探索的解释,并增加博客引擎和内容管理系统的交互性。该工具可以生成独立的网页或嵌入现有页面中,并且可以完全主题以匹配您的样式GUI。

简单试用

  • 安装
npm install -g idyll
  • 基本使用
idyll create

效果

构建&&运行

  • 构建
idyll build
  • 运行
可以直接打开 build 目录
或者
idyll watch 构建同时使用dev server

  • 添加自定义组件

    注意组件的名称 custom--component components/ 目录

components/custom-apps-component.js
const React = require('react');
class CustomAppsComponent extends React.Component {
  render() {
    const { hasError, idyll, updateProps, ...props } = this.props;
    return (
      <div {...props}>
       <h1 >荣锋亮 demo react 自定义组件</h1>      </div>
    );
  }
}

module.exports = CustomAppsComponent;
使用:
index.idyll 添加
[CustomAppsComponent /]

效果:

说明

idyll 使用起来比较简单,同时直接组件化开发(直接使用react 组件),对于图表的支持也是很不错的,默认demo
就有集成d3的简单例子,同时还可以方便的集成到web app 中

参考资料

https://idyll-lang.org/docs
https://github.com/rongfengliang/idyll-demo-project

posted on   荣锋亮  阅读(477)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2017-08-05 java 执行JavaScript 以及容器化的问题

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示