1 Star 8 Fork 3

Gitee 前端组 / gitee-monaco-editor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

gitee-monaco-editor

介绍

预构建的 monaco-editor 库,包含一些已构建好的资源,无需使用 monaco-editor-webpack-plugin 插件重新构建。

安装

yarn add git://gitee.com/gitee-frontend/gitee-monaco-editor.git#v2.0.0

版本说明

版本范围 使用仓库 区别
>=v1.0.0 and <v2.0.0 gitee 旧版 webpack output.publicPath 配置为 /webpacks/
v2.0.0 gitee-ent-web webpack output.publicPath 配置为 /vendor/monaco-editor

使用

引入样式文件和 js 模块:

import 'gitee-monaco-editor/lib/index.css'
import monaco from 'gitee-monaco-editor'

const editor = monaco.editor.create(document.getElementById('editor'))

修改 webpack 配置,添加 CopyWebpackPlugin 插件配置:

new CopyWebpackPlugin([
  {
    from: path.resolve(rootPath, 'node_modules/gitee-monaco-editor/lib'),
    to: outputPath,
    ignore: ['index.*']
  }
])

发布

在命令行中运行:

# 创建 beta 预发行版
yarn release-beta

# 创建正式发行版
yarn release

许可

MIT

The MIT License (MIT) Copyright (c) 2020 Gitee.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Pre-built assets package of monaco-editor 展开 收起
JavaScript 等 2 种语言
MIT
取消

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/gitee-frontend/gitee-monaco-editor.git
git@gitee.com:gitee-frontend/gitee-monaco-editor.git
gitee-frontend
gitee-monaco-editor
gitee-monaco-editor
master

搜索帮助