ashmind/mirrorsharp
소개
MirrorSharp is a code editor <textarea> built on Roslyn and CodeMirror
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalOverview
MirrorSharp is a reusable client-server code editor component built on Roslyn and CodeMirror.
Features
Code completion

Signature help

Quick fixes

Diagnostics

Quick info

Usage
You'll need the following:
- MirrorSharp.AspNetCore on the server (MirrorSharp.Owin if .NET Framework)
- mirrorsharp.js — client library that provides the user interface
Server
MirrorSharp.AspNetCore
Install-Package MirrorSharp.AspNetCore
If using Endpoint Routing (3.0+ only):
app.UseEndpoints(endpoints => {
// ...
endpoints.MapMirrorSharp("/mirrorsharp");
});
If not using Endpoint Routing:
app.MapMirrorSharp("/mirrosharp");
MirrorSharp.Owin
Install-Package MirrorSharp.Owin
In your Startup:
app.MapMirrorSharp("/mirrosharp");
Client
| Library | Type | NPM |
|---|---|---|
| mirrorsharp-codemirror-6-preview | Latest | |
| mirrorsharp | Stable |
npm install mirrorsharp-codemirror-6-preview --save
Note: The name is temporary — once all testing on 6-preview is completed, it will become mirrorsharp 3.
Breaking Changes
Version mirrorsharp-codemirror-6-preview (future mirrorsharp 3.0+) includes a number of breaking changes — see migration-from-2.md for the full migration guide.
Build
Since mirrorsharp JS files are not bundled, you'll need to use a bundler such as Webpack, Parcel or ESBuild.
You can see a Parcel example in AspNetCore.Demo.
Note that mirrorsharp is written in TypeScript, and the package includes full TypeScript types.
Note: You need to manually require/import mirrorsharp/mirrorsharp.css into your bundle.
Usage
import mirrorsharp from 'mirrorsharp-codemirror-6-preview';
mirrorsharp(container, { serviceUrl: 'wss://your_app_root/mirrorsharp' });
If you're not using HTTPS, you'll likely need ws:// instead of wss://.
Note that the container is an actual HTML element, and not a CSS selector.
API
TODO. In general the idea is that "it just works", however customization is a goal and some options are already available.
Demos
You can check out the demos if you clone the repository locally.
After cloning, run ms setup to build and prepare everything.
Testing
TODO, but see MirrorSharp.Testing on NuGet.
관련 프로젝트 살펴보기
불러오는 중…