一个代码在线编辑预览工具,类似codepen、jsbin、jsfiddle等。

Overview

code-run

一个代码在线编辑预览工具,类似codepen

在线使用:http://lxqnsys.com/code-run/,在线版支持用户登录相关功能,支持云端保存与分享,本仓库的代码不包含该部分功能,如有需要,可邮件联系:[email protected]

项目设计思路及开发过程可参考文章:https://juejin.cn/post/6965467528600485919

特性

  • 支持多种预处理语言

  • 支持多种布局随意切换

  • 支持添加额外的cssjs资源

  • 内置多种常用模板

  • 支持导出zip

  • 支持代码格式化

  • 美观强大的控制台

启动&打包

git clone https://github.com/wanglin2/code-run.git

cd code-run

npm i

npm run dev

npm run build

依赖

视图库:VUE 3.X

UI库:element-plus

编辑器:Monaco Editor

You might also like...
Comments
  • 导出 ZIP 报无法读取 dist/script.js

    导出 ZIP 报无法读取 dist/script.js

    image

    Uncaught (in promise) Error: Can't read the data of 'dist/script.js'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?
        at eval (jszip.min.js?c4e3:13:1)
    eval	@	jszip.min.js?c4e3:13
    Promise.then(异步)		
    exportZip	@	exportZip.js?bf5c:125
    await in exportZip(异步)		
    confirmExport	@	Header.vue?0418:272
    callWithErrorHandling	@	runtime-core.esm-bundler.js?5c40:155
    callWithAsyncErrorHandling	@	runtime-core.esm-bundler.js?5c40:164
    emit$1	@	runtime-core.esm-bundler.js?5c40:718
    eval	@	runtime-core.esm-bundler.js?5c40:7388
    handleClick	@	index.js?b4bc:78
    Object.onClick._cache.<computed>._cache.<computed>	@	index.js?b4bc:112
    callWithErrorHandling	@	runtime-core.esm-bundler.js?5c40:155
    callWithAsyncErrorHandling	@	runtime-core.esm-bundler.js?5c40:164
    invoker	@	runtime-dom.esm-bundler.js?830f:339
    
    opened by wishlong 2
Like codepen and jsbin but works offline.

Like codepen and jsbin but works offline.

EGOIST 1.1k Jan 2, 2023