Skip to content

Commit a14f0e7

Browse files
authored
Merge pull request #211 from mkslanc/use-vite
Change building tool from webpack to vite
2 parents 9ce1bc8 + 4aa8cd1 commit a14f0e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+12675
-10500
lines changed

README.md

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ace Linters (Ace Language Client)
22

3-
Ace linters is lsp client for Ace editor. It comes with large number of preconfigured easy to use in browser servers.
3+
Ace linters is lsp client for Ace editor. It comes with a large number of preconfigured easy to use in browser servers.
44

55
If you're uncertain about integrating ace-linters, consult [our diagram on the GitHub Wiki](https://github.com/mkslanc/ace-linters/wiki/Usage-Scenarios-Overview) for a quick setup guide
66
tailored to your needs.
@@ -28,6 +28,21 @@ languageProvider.registerEditor(editor);
2828
2929
[Example webworker.js with all services](https://github.com/mkslanc/ace-linters/blob/main/packages/demo/webworker-lsp/webworker.ts)
3030
31+
## What's New in 2.0.0
32+
33+
### Build System Migration
34+
- Migrated from webpack to Vite for faster builds and better development experience
35+
- UMD output format preserved - no changes required for existing integrations
36+
- Improved development workflow with Vite dev server and HMR support
37+
38+
### For Library Users
39+
No breaking changes - all existing code using ace-linters via CDN or npm **will continue to work without modifications**.
40+
41+
### For Contributors
42+
- Development server: `npm run start-dev` (no pre-build required)
43+
- Individual package builds use Vite instead of webpack
44+
- Workspace packages are aliased to source files during development for instant HMR
45+
3146
## New features in 1.8.1
3247
- add `manualSessionControl` provider option to disable automatic session registration. When enabled, you must manually handle session changes:
3348
```javascript
@@ -51,15 +66,15 @@ editor.on("changeSession", ({session}) => {
5166
```javascript
5267
// Set LSP configuration on session
5368
languageProvider.setSessionLspConfig(editor.session, {
54-
filePath: 'src/components/MyComponent.tsx',
55-
joinWorkspaceURI: true
69+
filePath: 'src/components/MyComponent.tsx',
70+
joinWorkspaceURI: true
5671
});
5772
```
5873
- add `setDocumentOptions` method to replace deprecated `setSessionOptions`:
5974
```javascript
6075
// Configure document-specific options (replaces setSessionOptions)
6176
languageProvider.setDocumentOptions(editor.session, {
62-
// service-specific options here
77+
// service-specific options here
6378
});
6479
```
6580
@@ -116,15 +131,15 @@ LanguageProvider.create(worker, {functionality: {semanticTokens: true}})
116131
<div id="editor" style="height: 100px">some text</div>
117132

118133
<script>
119-
ace.require("ace/ext/language_tools"); //To allow autocompletion
120-
var editor = ace.edit("editor", {
121-
enableBasicAutocompletion: true,
122-
enableLiveAutocompletion: true,
123-
mode: "ace/mode/css"
124-
});
125-
126-
var provider = LanguageProvider.fromCdn("https://www.unpkg.com/ace-linters@latest/build/");
127-
provider.registerEditor(editor);
134+
ace.require("ace/ext/language_tools"); //To allow autocompletion
135+
var editor = ace.edit("editor", {
136+
enableBasicAutocompletion: true,
137+
enableLiveAutocompletion: true,
138+
mode: "ace/mode/css"
139+
});
140+
141+
var provider = LanguageProvider.fromCdn("https://www.unpkg.com/ace-linters@latest/build/");
142+
provider.registerEditor(editor);
128143
</script>
129144
```
130145
@@ -144,14 +159,14 @@ import {AceLanguageClient} from "ace-linters/build/ace-language-client";
144159

145160
// Create a web socket
146161
const serverData = {
147-
module: () => import("ace-linters/build/language-client"),
148-
modes: "json|json5",
149-
type: "socket",
150-
socket: new WebSocket("ws://127.0.0.1:3000/exampleServer"), // address of your websocket server
162+
module: () => import("ace-linters/build/language-client"),
163+
modes: "json|json5",
164+
type: "socket",
165+
socket: new WebSocket("ws://127.0.0.1:3000/exampleServer"), // address of your websocket server
151166
}
152167
// Create an Ace editor
153168
let editor = ace.edit("container", {
154-
mode: new JSONMode() // Set the mode of the editor to JSON
169+
mode: new JSONMode() // Set the mode of the editor to JSON
155170
});
156171

157172
// Create a language provider for web socket

0 commit comments

Comments
 (0)