# gitee-monaco-editor **Repository Path**: bluishoul/gitee-monaco-editor ## Basic Information - **Project Name**: gitee-monaco-editor - **Description**: Pre-built assets package of monaco-editor - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2021-07-28 - **Last Updated**: 2021-07-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gitee-monaco-editor ## 介绍 预构建的 monaco-editor 库,包含一些已构建好的资源,无需使用 monaco-editor-webpack-plugin 插件重新构建。 ## 安装 ``` npm install git://gitee.com/gitee-frontend/gitee-monaco-editor.git ``` ## 使用 引入样式文件和 js 模块: ```js import 'gitee-monaco-editor/lib/index.css' import monaco from 'gitee-monaco-editor' const editor = monaco.editor.create(document.getElementById('editor')) ``` 修改 webpack 配置,添加 CopyWebpackPlugin 插件配置: ```js new CopyWebpackPlugin([ { from: path.resolve(rootPath, 'node_modules/gitee-monaco-editor/lib'), to: outputPath, ignore: ['index.*'] } ]) ``` ## 发布 在命令行中运行: ``` bash # 创建 beta 预发行版 npm run release-beta # 创建正式发行版 npm run release ``` ## 许可 [MIT](LICENSE)